<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Chameleon - new forum posts</title>
		<link>http://chameleon.wikidot.com/forum/start</link>
		<description>Posts in forums of the site &quot;Chameleon&quot; - A blogging engine</description>
				<copyright></copyright>
		<lastBuildDate></lastBuildDate>
		
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-512756</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-512756</link>
				<description></description>
				<pubDate>Fri, 19 Jun 2009 06:39:41 +0000</pubDate>
				<wikidot:authorName>skirti</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hey,<br /> I am not able to use rails helpers in liquid code (like form_for, check_box_tag)..<br /> It gives an error saying Unknown tag 'form_for'</p> <p>Has anybody used it before?</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-488232</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-488232</link>
				<description></description>
				<pubDate>Sat, 23 May 2009 21:04:21 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Manuel,</p> <p>As you may have already seen on the homepage, Chameleon is not under active development anymore. I stopped working on it more than a year ago. Meanwhile, I forgot a lot about how it works, so I might not be able to help you completely.</p> <p>As for your problem, in the .liquid templates you're not using the User model (which is in app/models/user.rb), but the UserDrop (which is in lib/chameleon/liquid/user_drop.rb). So, you need to add you 'get_current_user' method to the UserDrop.</p> <p>(If that doesn't work, you might need to add the 'get_current_user' method to the User model, and afterwards add a new 'get_current_user' to UserDrop which simply calls the other one.)</p> <p>I hope this helps,<br /> JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-486620</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-486620</link>
				<description></description>
				<pubDate>Thu, 21 May 2009 22:51:04 +0000</pubDate>
				<wikidot:authorName>Manuel</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>sorry, i say image_tag tag, but i returns the url with the image_path tag</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-486619</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-486619</link>
				<description></description>
				<pubDate>Thu, 21 May 2009 22:49:17 +0000</pubDate>
				<wikidot:authorName>Manuel</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>i have a similar problem,</p> <p>i have many users in a website and i need restrict my image_tag tag to only find the asset for the present user.</p> <p>i have this code:</p> <p>module TextFilters<br /> include ActionView::Helpers::TagHelper</p> <p>def image_path(name, size = 'original')<br /> @user.assets.find_by_name(name).asset.url(size)<br /> end</p> <p>end</p> <p>logically this returns an error, since to @user it does not exist, i need to execute a method in the User model, for example: User.get_current_user</p> <p>class User &lt; ActiveRecord::Base</p> <p>def get_current_user<br /> User.find_by_subdomain(current_subdomain)<br /> end</p> <p>end</p> <p>Liquid error: undefined method ‘get_current_user’ for #<br /> &lt;class:0x2f8c648/&gt;</p> <p>they have an idea?</p> <p>i try with session[:user] but don't works too</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-88259#post-258794</guid>
				<title>Re: Dusty dependencies</title>
				<link>http://chameleon.wikidot.com/forum/t-88259/dusty-dependencies#post-258794</link>
				<description></description>
				<pubDate>Fri, 12 Sep 2008 17:30:33 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi Eugenio,</p> <p>rcov isn't really required, the only thing it's used for is to check the test coverage, but since that's only of interest to someone actually writing tests, you won't need it.</p> <p>Oh, and, I'd also like to warn you, Chameleon is not being very actively maintained anymore. As you may have seen, the latest release is already quite old, Chameleon still uses an old Ruby on Rails version, not all desired features have been implemented… I personally would be glad to help you with any problems you would encounter while trying to set up a blog using Chameleon, but I most likely won't be making any changes to the Chameleon code anymore. Of course, you can still make changes yourself, and I'd be glad to include them in the code.</p> <p>Greetings,<br /> JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-88259/dusty-dependencies">Dusty dependencies</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-88259#post-257745</guid>
				<title>Dusty dependencies</title>
				<link>http://chameleon.wikidot.com/forum/t-88259/dusty-dependencies#post-257745</link>
				<description></description>
				<pubDate>Thu, 11 Sep 2008 04:59:52 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hello, I'd like to implement this rather easily escalable blog as a multimedia one for musicians. The first issues I encountered was the old dependencies it has.</p> <p>Why does it need rcov, which needs actionwebservice, which asks for specific old versions of actionpack and activerecord? How could I avoid it?</p> <p>Thank you;</p> <p>Eugenio.</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-88259/dusty-dependencies">Dusty dependencies</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-50239#post-139981</guid>
				<title>Re: Please help........</title>
				<link>http://chameleon.wikidot.com/forum/t-50239/please-help#post-139981</link>
				<description></description>
				<pubDate>Mon, 07 Apr 2008 10:44:53 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>First of all, did you create a database (an empty one), and add its settings to the file config/database.yml? You can create an empty database using a program such as phpMyAdmin.<br /> Afterwards, run the command "rake db:schema:load" to load the database schema (this will set up the tables). When that's done, run "rake db:fixtures:load" to load some of the content for the database.</p> <p>Greetings,<br /> JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-50239/please-help">Please help........</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-50239#post-134861</guid>
				<title>Please help........</title>
				<link>http://chameleon.wikidot.com/forum/t-50239/please-help#post-134861</link>
				<description></description>
				<pubDate>Mon, 31 Mar 2008 05:27:07 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>i've just download the latest chameleon-0.6.2 and i can't start it…<br /> i guess it was because it can't find its database… but then i tried "rake db:create:all", but it give me error message</p> <p>(in D:/Aptana Studio/chameleon-0.6.2)<br /> rake aborted!<br /> no such file to load — rcov/rcovtask<br /> D:/Aptana Studio/chameleon-0.6.2/rakefile:10<br /> (See full trace by running task with —trace)</p> <p>what's happening here… i've follow the readme file and i'm still stucked….</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-50239/please-help">Please help........</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-47676#post-127285</guid>
				<title>Chameleon 0.6.2 (Beta) released</title>
				<link>http://chameleon.wikidot.com/forum/t-47676/chameleon-0-6-2-beta-released#post-127285</link>
				<description></description>
				<pubDate>Tue, 18 Mar 2008 20:00:23 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Just now, version 0.6.2 of Chameleon was released. Version 0.6.2 is a quite large release, that adds some new features and fixes some bugs.</p> <p>In this release <a href="https://launchpad.net/chameleon/+milestone/0.6.2">many bugs</a> were fixed, some severe ones that would prevent you from creating new posts, and some less important ones. In general, these bug fixes will make Chameleon more stable, so it's recommended you upgrade to this version. I'd also like to thank everyone who reported bugs.</p> <p>Additionally, this release also ships with a few new features. Along the same line, this release adds unit tests for most of the Chameleon code, which made it possible to find a few bugs, and will make it easier to solve issues in the future. We upgraded to Rails 1.2, which is more stable than Rails 1.1, and includes some new features that should also ease development in the future. Finally, James also added a live preview and an auto-save function to the write page, which should make working with Chameleon easier.</p> <p>You can download Chameleon 0.6.2 (Beta) at <a href="http://chameleon.wikidot.com/download">http://chameleon.wikidot.com/download</a>, and follow the instructions in the README included in the package to install it. These instructions and a lot more information are also available on <a href="http://chameleon.wikidot.com">the website</a>.<br /> Because Chameleon is still in beta, some problems might occur. Report any issues in the <a href="https://bugs.launchpad.net/chameleon/">bug tracker</a>.</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-8024">General / Announcements</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-47676/chameleon-0-6-2-beta-released">Chameleon 0.6.2 (Beta) released</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-117557</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-117557</link>
				<description></description>
				<pubDate>Mon, 03 Mar 2008 18:17:30 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>James,</p> <p>Could you add the following Liquid code to your template, and then copy what it returns from the HTML source code?</p> <div class="code"> <pre> <code>{{ 'br' | tag }} {{ 'test.png' | image_tag }} {{ 'test.png' | imagemagick_tag }}</code> </pre></div> <p>Normally, it should return something like this:</p> <div class="code"> <pre> <code>&lt;br /&gt; &lt;img alt="Test" src="http://chameleon.wikidot.com/images/test.png?" /&gt; &lt;img alt="Imagemagick?id=test" src="http://0.0.0.0:3000/blog/imagemagick?id=test.png" /&gt;</code> </pre></div> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-116878</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-116878</link>
				<description></description>
				<pubDate>Sun, 02 Mar 2008 18:53:44 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW,<br /> In the source is says:<br /> Liquid error: undefined method ‘tag’ for #&lt;Liquid::Strainer:0x2fecf20&gt;<br /> Any idea about what this means?</p> <p>James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-116517</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-116517</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 19:38:44 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi James,</p> <p>Could you use the "View Source" option in your browser, to find what's behind the #. Normally there should be something between a &lt; and a &gt; there. Maybe that could help us get a clue.</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-116394</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-116394</link>
				<description></description>
				<pubDate>Sat, 01 Mar 2008 15:21:26 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW,<br /> Still getting the same old 'Liquid error: undefined method ‘tag’ for #'… i inserted the above and reset the server and nothing…</p> <p>Any other ideas?<br /> James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43455#post-115883</guid>
				<title>Re: adding flickr photos to index page</title>
				<link>http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page#post-115883</link>
				<description></description>
				<pubDate>Fri, 29 Feb 2008 15:21:16 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Where did you get the FlickrController? Can I see its source code? The code for @photos is probably in there somewhere.</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page">adding flickr photos to index page</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43455#post-115704</guid>
				<title>Re: adding flickr photos to index page</title>
				<link>http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page#post-115704</link>
				<description></description>
				<pubDate>Fri, 29 Feb 2008 06:17:42 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I dont know what to set in the [something]. I have a flickr controller where the @photos is loaded with flickr pics. how to put the same photos variable in blog controller with flickr pics loaded.</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page">adding flickr photos to index page</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43455#post-115323</guid>
				<title>Re: adding flickr photos to index page</title>
				<link>http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page#post-115323</link>
				<description></description>
				<pubDate>Thu, 28 Feb 2008 15:49:24 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>You are right, if the include works outside the 'for' loop but not inside it, it means there's nothing in the 'photos' variable. If you want that variable to be in blog.liquid, you need to create it in app/controllers/blog_controller.rb, in the "load_liquid_variables" function. So, at the end of file, you need to change the code to something like:</p> <div class="code"> <pre> <code>def load_liquid_variables @site = Liquid::SiteDrop.new(self) @option = Liquid::OptionDrop.new @user = @session["user"] @photos = [something] end</code> </pre></div> <p>You need to replace the "[something]" with the code to load the photos, but I don't know what that code is (I don't know exactly how the rflickr gem works). Could you try this?</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page">adding flickr photos to index page</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43455#post-115074</guid>
				<title>Re: adding flickr photos to index page</title>
				<link>http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page#post-115074</link>
				<description></description>
				<pubDate>Thu, 28 Feb 2008 03:42:47 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>sorry typo the photos variable in flickr controller is not passed into the blog.liquid</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page">adding flickr photos to index page</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43455#post-115071</guid>
				<title>Re: adding flickr photos to index page</title>
				<link>http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page#post-115071</link>
				<description></description>
				<pubDate>Thu, 28 Feb 2008 03:41:03 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hey JW,</p> <p>{% for photo in photos %}<br /> {% include 'flickr/flickr' with photo: photo %}<br /> {% endfor %}</p> <p>This code of flickr is not working in blog.liquid When I remove the for loop and call the 'flickr' partial it is going into the flickr partial and printing the text I kept in partial…. i think the 'photos' variable in flickr controller is being passed into the blog.liquid Any help….</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page">adding flickr photos to index page</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-114785</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-114785</link>
				<description></description>
				<pubDate>Wed, 27 Feb 2008 17:30:54 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi James,</p> <p>It seems you have to add another line to app/helpers/blog_helper.rb, it becomes:</p> <div class="code"> <pre> <code>module BlogHelper include ActionView::Helpers::TagHelper include ActionView::Helpers::AssetTagHelper end</code> </pre></div> <p>I hope this works.<br /> JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-114719</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-114719</link>
				<description></description>
				<pubDate>Wed, 27 Feb 2008 15:50:13 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW,<br /> I placed the code into the clog controller and got the following error:<br /> Liquid error: undefined method ‘tag’ for #</p> <p>Thanks for the help so far,<br /> James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43455#post-114221</guid>
				<title>Re: adding flickr photos to index page</title>
				<link>http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page#post-114221</link>
				<description></description>
				<pubDate>Tue, 26 Feb 2008 21:26:35 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Are you sure the file is at themes/scribbish/templates/flickr/_flickr.liquid (just double checking)? And if you write some regular text in the _flickr.liquid file, does that work?</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page">adding flickr photos to index page</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43455#post-114193</guid>
				<title>Re: adding flickr photos to index page</title>
				<link>http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page#post-114193</link>
				<description></description>
				<pubDate>Tue, 26 Feb 2008 20:32:23 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>sorry the layout blog.liquid is</p> <p>{% for photo in photos %}<br /> {% include 'flickr/flickr' with photo: photo %}<br /> {% endfor %}</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page">adding flickr photos to index page</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43455#post-114191</guid>
				<title>Re: adding flickr photos to index page</title>
				<link>http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page#post-114191</link>
				<description></description>
				<pubDate>Tue, 26 Feb 2008 20:29:30 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW,</p> <p>strangely after doing what you said. I did not get the photo feed in the page. To explain the situation better, I have a flickr controller where the '@photos' is loaded with all the photos in my flickr profile. Now I created a flickr folder in the scribbish theme and created a partial _flickr.liquid with</p> <p><tt>flickr_photo_tag(photo)</tt></p> <p>in the layout of blog.liquid I inserted the code.</p> <p>{% for photo in photos %}<br /> {% include 'flickr/flickr' %}<br /> {% endfor %}</p> <p>But I am not getting the things done!!!</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page">adding flickr photos to index page</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43455#post-114167</guid>
				<title>Re: adding flickr photos to index page</title>
				<link>http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page#post-114167</link>
				<description></description>
				<pubDate>Tue, 26 Feb 2008 19:29:49 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>You can create a partial by simply creating a file called _&lt;name for the partial&gt;.liquid in themes/&lt;the name of the theme you're using&gt;/blog. Then, to include the partial, you simply use the <a href="http://chameleon.wikidot.com/doc:themes:include">include</a> Liquid tag, like this:</p> <div class="code"> <pre> <code>{% include 'blog/&lt;name for the partial&gt;' %}</code> </pre></div> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page">adding flickr photos to index page</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-114102</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-114102</link>
				<description></description>
				<pubDate>Tue, 26 Feb 2008 17:03:36 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>James,</p> <p>When using that ImageMagick library, you have to add this to app/controllers/blog_controller.rb:</p> <div class="code"> <pre> <code>class BlogController &lt; ApplicationController imagemagick_for '/var/lib/photos'</code> </pre></div> <p>where /var/lib/photos is the directory where the images you'll be using are stored. Did you do this?</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43109#post-114099</guid>
				<title>Re: unable to create new post in safari browser</title>
				<link>http://chameleon.wikidot.com/forum/t-43109/unable-to-create-new-post-in-safari-browser#post-114099</link>
				<description></description>
				<pubDate>Tue, 26 Feb 2008 16:58:59 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>HI JW,</p> <p>Yes firstly I would certainly like to help chameleon. I trying to create plugins for flickr and code colorizer. I am ready to create a site for chameleon. I have hosting also. So If you are interested in doing a site I am more than ready to help….</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43109/unable-to-create-new-post-in-safari-browser">unable to create new post in safari browser</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43109#post-114093</guid>
				<title>Re: unable to create new post in safari browser</title>
				<link>http://chameleon.wikidot.com/forum/t-43109/unable-to-create-new-post-in-safari-browser#post-114093</link>
				<description></description>
				<pubDate>Tue, 26 Feb 2008 16:50:15 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks for the kind words. I appreciate that you like what I've done. If you'd ever want to do something specific for Chameleon, or if you'd develop a site using Chameleon, let me know.</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43109/unable-to-create-new-post-in-safari-browser">unable to create new post in safari browser</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43455#post-113764</guid>
				<title>adding flickr photos to index page</title>
				<link>http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page#post-113764</link>
				<description></description>
				<pubDate>Tue, 26 Feb 2008 03:28:14 +0000</pubDate>
				<wikidot:authorName>stranger</wikidot:authorName>				<wikidot:authorUserId>86714</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>hi JW,</p> <p>I am trying to add flickr photos on index page of the blog in the sidebar. I installed the 'rflickr' gem and configured it. An in the url '<a href="http://lcoalhost:3000/flickr/show">http://lcoalhost:3000/flickr/show</a>' I am able to see my flickr photos feed. I want to put the feed in a partial and call the partial in the blog.liquid template. I am new to liquid. So can you help me in this issue.</p> <p>stranger</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43455/adding-flickr-photos-to-index-page">adding flickr photos to index page</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-113479</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-113479</link>
				<description></description>
				<pubDate>Mon, 25 Feb 2008 18:30:34 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW,<br /> Sorry still have an error. I followed all your changes and now get the error 'Liquid error: undefined method ‘url_for_imagemagick’ for #'.</p> <p>Any suggestions?</p> <p>James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43262#post-113000</guid>
				<title>hello all</title>
				<link>http://chameleon.wikidot.com/forum/t-43262/hello-all#post-113000</link>
				<description></description>
				<pubDate>Mon, 25 Feb 2008 07:24:58 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>seems working cool!!</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7964">General / General discussion</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43262/hello-all">hello all</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43109#post-112995</guid>
				<title>Re: unable to create new post in safari browser</title>
				<link>http://chameleon.wikidot.com/forum/t-43109/unable-to-create-new-post-in-safari-browser#post-112995</link>
				<description></description>
				<pubDate>Mon, 25 Feb 2008 06:56:29 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>thanks a lot for the quick fix… I really appreciate your work… I am also kind of interested in developing rails applications. I am implementing a blog using rails and I did not find typo or mephisto to be matching my requirements. I liked chameloen for its code simplicity. I will certainly help the community as far as I can…</p> <p>thank you</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43109/unable-to-create-new-post-in-safari-browser">unable to create new post in safari browser</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43109#post-112800</guid>
				<title>Re: unable to create new post in safari browser</title>
				<link>http://chameleon.wikidot.com/forum/t-43109/unable-to-create-new-post-in-safari-browser#post-112800</link>
				<description></description>
				<pubDate>Sun, 24 Feb 2008 19:28:42 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>Thanks for submitting this bug report! I provided a fix <a href="https://bugs.launchpad.net/chameleon/+bug/194974">here</a>. The submitButton(this) call did indeed cause the problem, replacing your existing public/javascripts/admin.js with <a href="http://launchpadlibrarian.net/12174687/admin.js">this file</a> should solve your problem.</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43109/unable-to-create-new-post-in-safari-browser">unable to create new post in safari browser</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-112684</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-112684</link>
				<description></description>
				<pubDate>Sun, 24 Feb 2008 15:23:58 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi James,</p> <p>It seems the ImageMagick plugin depends on a helper that's by default included in Rails. I made some changes to the code to make it easier to use Rails helpers in Chameleon in the future, could you try to download <a href="http://chameleon.wikidot.com/local--files/forum:thread/rails_integration.rb">this file</a>, and replace lib/chameleon/liquid/rails_integration.rb with it. Then, in app/helpers/blog_helper.rb, write this:</p> <div class="code"> <pre> <code>module BlogHelper include ActionView::Helpers::AssetTagHelper end</code> </pre></div> <p>Normally, everything should work fine then.</p> <p>To answer your first question, why not use RHTML instead of Liquid, the answer is because of security. My goal is to make it easy for people to create custom themes for Chameleon in the future, and Liquid ensures that when you download and install a theme made by someone else, it can't harm your data. So, themes shouldn't be able to (accidentally or on purpose) delete your entries. You can however still use RHTML, by simply changing the extension of a theme file from ".liquid" to ".rhtml". This makes Rails switch from using Liquid to using the default Rails template parser. However, then you lose the security Liquid provides, and some of the shortcuts built in into Liquid (for example the "comment_form" tag or the "url_for" filters).</p> <p>Greetings,<br /> JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-43109#post-112567</guid>
				<title>unable to create new post in safari browser</title>
				<link>http://chameleon.wikidot.com/forum/t-43109/unable-to-create-new-post-in-safari-browser#post-112567</link>
				<description></description>
				<pubDate>Sun, 24 Feb 2008 07:45:14 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>hello everybody,</p> <p>I am learning rails past 3 months. I am trying to create my own blog using. So i am reusing chameleon code to make up my requirements. But I found that when I try to create a new post in safari browser it doesn't process anything. All the buttons gets disabled. Firefox seems to work fine on both mac and windows.</p> <p>Is this due to the javascript call "submitButton(this)" call in write.rhtml of admin entry views. Does anybody faced the same problem. please help..</p> <p>I congratulate the whole team behind chameleon for putting such a great effort in running this open source project. Would love to contribute something from my side tooo….</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-43109/unable-to-create-new-post-in-safari-browser">unable to create new post in safari browser</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-109278</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-109278</link>
				<description></description>
				<pubDate>Mon, 18 Feb 2008 21:55:39 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW, i'm sorry i spoke too soon,<br /> I am getting an error labeled 'Liquid error: undefined method ‘image_tag’ for #' any ideas?</p> <p>I also added this to the blog controller 'imagemagick_for '/public/blog/images' '.</p> <p>Thanks,<br /> James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-109270</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-109270</link>
				<description></description>
				<pubDate>Mon, 18 Feb 2008 21:11:43 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Worked Perfectly!<br /> Thanks you're a genius!<br /> However as Chameleon is most likely gonna be used by folk who understand rails i've got to question why use .liquid if rhtml tags can't be added easily?</p> <p>Cheers once again,<br /> James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-98511</guid>
				<title>Re: Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-98511</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 19:59:04 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>James,</p> <p>I take it you are using the "ImageMagick for Rails" plugin from <a href="http://vantulder.net/rails/magick/">here</a>? If so, first of all, you will have to add "<tt>include ActionView::Helpers::ImageMagickMacroHelper</tt>" to <tt>app/helpers/application_helper.rb</tt>, so it becomes:</p> <div class="code"> <pre> <code>module ApplicationHelper include ActionView::Helpers::ImageMagickMacroHelper end</code> </pre></div> <p>In the templates, you call the plugin functions like this:</p> <div class="code"> <pre> <code>{{ 'first_photo.jpg' | imagemagick_tag }}</code> </pre></div> <p>However, this returns an error in the plugin. So, you'll have to edit <tt>vendor/plugins/imagemagick_tag/lib/image_magick_macro_helper.rb</tt>, around line 124, to read:</p> <div class="code"> <pre> <code>def imagemagick_controller(options) options[:controller] ? (options[:controller].camelize + "Controller").constantize.new : @context.registers[:controller] end</code> </pre></div> <p>This should make the plugin work correctly with Liquid and Chameleon. To use the tag you gave in your post, you'd write:</p> <div class="code"> <pre> <code>{{ 'first_photo.jpg' | imagemagick_tag: 'resize(100x100)' }}</code> </pre></div> <p>If this wouldn't work, let me know.</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-37448#post-97187</guid>
				<title>Inserting code into .liquid</title>
				<link>http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid#post-97187</link>
				<description></description>
				<pubDate>Fri, 25 Jan 2008 16:04:03 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW,<br /> I am hoping to install an image processing script so that when people upload photos to go with articles they can be automatically resized. I am planning ot use ImageMagick (and RMagick2) but it requires some code to be placed in the view.</p> <p>Code such as this:<br /> [code]<br /> &lt;%= imagemagick_tag 'first_photo.jpg', 'resize(100x100)' %&gt;<br /> [/code]</p> <p>How can code be placed in the view since you are using .liquid?</p> <p>James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-37448/inserting-code-into-liquid">Inserting code into .liquid</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-93505</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-93505</link>
				<description></description>
				<pubDate>Fri, 18 Jan 2008 17:10:35 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Whew… glad this problem was finally solved. I'll include the changes from above in the next version of Chameleon to make sure this problem doesn't happen anymore.</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-91434</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-91434</link>
				<description></description>
				<pubDate>Mon, 14 Jan 2008 21:07:19 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Finally got it sorted! It was my hosts fault… they were telling me to reset mongrel which i was doing but it was not properly refreshing the controllers in the cache. Once i had altered the code to that you gave me above it worked just fine!</p> <p>Thanks for all your help JW,</p> <p>James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-83574</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-83574</link>
				<description></description>
				<pubDate>Mon, 24 Dec 2007 18:57:43 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>OK, glad I could help.</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-82222</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-82222</link>
				<description></description>
				<pubDate>Thu, 20 Dec 2007 14:09:41 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi,<br /> Although i am still having problems with this i thought it would be constructive to post to let you know what happened. I am still unaware as to why the script does not work but the changes were not taking place because the production server is running on mongrel. I was not reseting this after each change.<br /> I will post again with an update if i get this fixed properly. In the meantime i am running a mega cut-down dashboard with simple links.</p> <p>Thanks for the help so far,<br /> James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74746</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74746</link>
				<description></description>
				<pubDate>Sun, 02 Dec 2007 18:48:33 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi James,</p> <p>That error is really strange. The only thing I can think of is that you forgot to restart your server after making the changes to dashboard_controller.rb. In production mode, it is necessary to restart the server (or at least restart Rails) after each change to the code. And I'm glad I can help, these bug reports help me make Chameleon better and compatible on more servers. It's no problem, if I wouldn't like doing it I wouldn't be doing it.</p> <p>Greetings,<br /> JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74733</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74733</link>
				<description></description>
				<pubDate>Sun, 02 Dec 2007 18:12:52 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW,<br /> Both queries execute fine in phpMyAdmin.</p> <p>The new production log output says:</p> <div class="code"> <pre> <code>Processing DashboardController#welcome (for 90.193.36.72 at 2007-12-02 17:08:54) [GET] Session ID: 116cd49852089d73e0984a310c4aeae4 Parameters: {"action"=&gt;"welcome", "controller"=&gt;"admin/dashboard"} ActiveRecord::StatementInvalid (Mysql::Error: Invalid use of group function: SELECT author, website FROM comments WHERE (approved = 1) ORDER BY COUNT(author) DESC LIMIT 1): /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log' /vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:184:in `execute' /vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:336:in `select' /vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:175:in `select_all' /vendor/rails/activerecord/lib/active_record/base.rb:390:in `find_by_sql' /vendor/rails/activerecord/lib/active_record/base.rb:924:in `find_every' /vendor/rails/activerecord/lib/active_record/base.rb:918:in `find_initial' /vendor/rails/activerecord/lib/active_record/base.rb:380:in `find' /app/controllers/admin/dashboard_controller.rb:27:in `welcome' /vendor/rails/actionpack/lib/action_controller/base.rb:941:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:941:in `perform_action_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in `perform_action' /vendor/rails/actionpack/lib/action_controller/base.rb:408:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:408:in `process_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in `process' /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 /usr/local/bin/mongrel_rails:16:in `load' /usr/local/bin/mongrel_rails:16</code> </pre></div> <p>This is really strange… i really do appreciate the support you have provided so far… is there somewhere i can donate to buy you a drink or something?</p> <p>Thanks,<br /> James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74661</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74661</link>
				<description></description>
				<pubDate>Sun, 02 Dec 2007 11:25:46 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi James,</p> <p>Your dashboard_controller seems fine. Try executing these two SQL queries in PHPMyAdmin:</p> <blockquote> <p>SELECT author, website, COUNT(author) as count FROM comments WHERE approved = 1 GROUP BY author ORDER BY count DESC LIMIT 1</p> </blockquote> <blockquote> <p>SELECT name, COUNT(*) AS count FROM tags JOIN entries_tags ON tags.id = entries_tags.tag_id GROUP BY name ORDER BY count DESC LIMIT 5</p> </blockquote> <p>Do they work correctly?</p> <p>If not, simply delete lines 23-28 in your app/controllers/admin/dashboard_controller.rb. So,</p> <blockquote> <p>@most_active_commenter = … some code …<br /> @most_used_tags = … some code …</p> </blockquote> <p>is deleted. Now, the most active commenter and the most used tags won't be displayed on the dashboard anymore.<br /> If any error would still occur, let me know, but I think I'll need a new excerpt from your production log then.</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74559</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74559</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 22:16:16 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW,<br /> Sorry but that's still not working…</p> <p>Is this what the dashboard_controller should say:</p> <div class="code"> <pre> <code>class Admin::DashboardController &lt; Admin::BaseController # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) verify :method =&gt; :get, :redirect_to =&gt; {:action =&gt; :index}, :add_flash =&gt; {:notice =&gt; "The page was requested with a POST request, while GET is prefered."} # Redirect to the welcome page. def index redirect_to :action =&gt; "welcome" end # Show the welcome page. def welcome @latest_comments = Comment.find(:all, :conditions =&gt; "approved = '1'", :order =&gt; "date DESC", :limit =&gt; 5) @latest_entries = Entry.find(:all, :conditions =&gt; "state = 'P'", :order =&gt; "date_published DESC", :limit =&gt; 5) @drafts = Entry.find(:all, :conditions =&gt; "state = 'D'", :limit =&gt; 10) @total_entries = Entry.count @total_entries_published = Entry.count(:conditions =&gt; "state = 'P'") @total_entries_draft = Entry.count(:conditions =&gt; "state = 'D'") #@total_entries_tobepublished = Entry.count(:conditions =&gt; "state = 'W'") @most_active_commenter = Comment.find_by_sql("SELECT author, website, " + "COUNT(author) as count FROM comments WHERE approved = 1 " + "GROUP BY author ORDER BY count DESC LIMIT 1")[0] @most_used_tags = Tag.find_by_sql "SELECT name, COUNT(*) AS count " + "FROM tags JOIN entries_tags ON tags.id = entries_tags.tag_id " + "GROUP BY name ORDER BY count DESC LIMIT 5" end end</code> </pre></div> <p>My Welcome.rhtml says this:</p> <div class="code"> <pre> <code>&lt;%- @title = "Welcome" -%&gt; &lt;div id="dashboard_welcome" class="content"&gt; &lt;h2&gt;Welcome &lt;%= session["user"].nickname %&gt;!&lt;/h2&gt; &lt;p id="welcome_intro"&gt; Welcome in the administration center of your area. Here, you have total control over everything that happens to do with your articles.&lt;/p&gt; &lt;div id="actionsbox"&gt; &lt;p id="welcome_intro"&gt; These are some of the things you may want to do:&lt;/p&gt; &lt;ul id="welcome_actions"&gt; &lt;div id="welcome_actions_lhcol"&gt; &lt;li class="iconwrite" &gt;&lt;%= link_to "Write a new article", {:controller =&gt; "entries", :action =&gt; "write"} %&gt;&lt;/li&gt; &lt;li class="iconview" &gt;&lt;%= link_to "View your drafts", {:controller =&gt; "entries", :action =&gt; "drafts"} %&gt;&lt;/li&gt; &lt;li class="iconidea" &gt;&lt;%= link_to "Get an idea", {:controller =&gt; "ideas", :action =&gt; "view"} %&gt;&lt;/li&gt; &lt;/div&gt; &lt;% if session["user"].permission == "admin" %&gt; &lt;p&gt; As an admin here are some things you may wish to do:&lt;/p&gt; &lt;div id="welcome_actions_admin"&gt; &lt;li&gt;&lt;%= link_to "Add New User", {:controller =&gt; "users", :action =&gt; "add"} %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= link_to "Manage Users", {:controller =&gt; "users", :action =&gt; "manage"} %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= link_to "Ease 'Writers Block'", {:controller =&gt; "ideas", :action =&gt; "add"} %&gt;&lt;/li&gt; &lt;%- if @total_entries_approval.length == 1 %&gt; &lt;li class="red"&gt;&lt;%= link_to "#{@total_entries_awaiting} Article awaiting approval", {:controller =&gt; "entries", :action =&gt; "editors"} %&gt;&lt;/li&gt; &lt;% end %&gt; &lt;%- if @total_entries_approval.length &gt; 1 %&gt; &lt;li class="red"&gt;&lt;%= link_to "#{@total_entries_awaiting} Articles awaiting approval", {:controller =&gt; "entries", :action =&gt; "editors"} %&gt;&lt;/li&gt; &lt;% end %&gt; &lt;% end %&gt; &lt;/div&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="welcome_recent"&gt; &lt;h3&gt;Recent activity&lt;/h3&gt; &lt;%- if @latest_comments.length &gt; 0 -%&gt; &lt;p&gt;These are the last comments added to NCMag Online:&lt;/p&gt; &lt;ul&gt; &lt;%- for comment in @latest_comments -%&gt; &lt;li&gt;&lt;%= comment_author comment %&gt; commented on &lt;a href="&lt;%= comment.permalink %&gt;"&gt;&lt;%=h comment.entry.title %&gt;&lt;/a&gt;&lt;/li&gt; &lt;%- end %&gt; &lt;/ul&gt; &lt;%- end -%&gt; &lt;%- if @latest_entries.length &gt; 0 -%&gt; &lt;p&gt;These are the latest articles published on NCmag Online:&lt;/p&gt; &lt;ul&gt; &lt;%- for entry in @latest_entries -%&gt; &lt;li&gt;&lt;%= link_to html_escape(entry.title), {:controller =&gt; "/blog", :action =&gt; "show", :slug =&gt; entry.slug} %&gt;&lt;/li&gt; &lt;%- end %&gt; &lt;/ul&gt; &lt;%- end -%&gt; &lt;%- if @latest_entries.length == 0 -%&gt; &lt;p&gt;No entries are yet published on this blog. &lt;%= link_to "Start creating them now!", {:controller =&gt; "entries", :action =&gt; "write"} %&gt;&lt;/p&gt; &lt;%- end -%&gt; &lt;/div&gt; &lt;div id="welcome_drafts"&gt; &lt;h3&gt;Repository&lt;/h3&gt; &lt;p&gt;These articles are drafts stored in the repository and still need to be finished:&lt;/p&gt; &lt;ul&gt; &lt;%- for entry in @drafts -%&gt; &lt;li&gt;&lt;%= link_to html_escape(entry.title), {:controller =&gt; "entries", :action =&gt; "write", :id =&gt; entry.id} %&gt;&lt;/li&gt; &lt;%- end -%&gt; &lt;%- if @drafts.length == 0 -%&gt; &lt;li&gt;None. You worked through the pile of drafts. Now why not &lt;%= link_to "select a new idea", {:controller =&gt; "ideas", :action =&gt; "view"} %&gt;!&lt;/li&gt; &lt;%- end -%&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="welcome_quickfacts"&gt; &lt;h3&gt;Quick facts&lt;/h3&gt; &lt;p&gt;Some quick facts about NCMag Online.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;NCMag Online currently has &lt;%= @total_entries %&gt; entries: &lt;%= @total_entries_published %&gt; published and &lt;%= @total_entries_draft %&gt; drafts. &lt;%# and @total_entries_tobepublished to be published. %&gt;&lt;/li&gt; &lt;%- if @latest_entries[0] -%&gt; &lt;li&gt;The last published entry was "&lt;%= link_to @latest_entries[0].title, {:controller =&gt; "/blog", :action =&gt; "show", :slug =&gt; @latest_entries[0].slug} %&gt;".&lt;/li&gt; &lt;%- end -%&gt; &lt;%- if @most_active_commenter -%&gt; &lt;li&gt;The most active commenter on NCMag Online is &lt;%= comment_author @most_active_commenter %&gt;.&lt;/li&gt; &lt;%- end -%&gt; &lt;%- if @most_used_tags and @most_used_tags.length &gt; 0 -%&gt; &lt;li&gt;The most used tags are: &lt;ul&gt; &lt;%- for tag in @most_used_tags -%&gt; &lt;li&gt;&lt;%= tag["name"] %&gt;&lt;/li&gt; &lt;%- end -%&gt; &lt;/ul&gt; &lt;/li&gt; &lt;%- end -%&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div style="clear: both;" /&gt; &lt;/div&gt;</code> </pre></div> <p>Thanks,</p> <p>James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74546</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74546</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 21:38:28 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>James,</p> <p>I think there were two problems in the dashboard, and that we only fixed the first one. Could you, in app/controllers/admin/dashboard_controller.rb change lines 23-27, from:</p> <blockquote> <p>@most_active_commenter = […whatever is written here at the moment…]<br /> @most_used_tags = Tag.find_by_sql "SELECT name, COUNT(*) FROM tags " +<br /> "JOIN entries_tags ON tags.id = entries_tags.tag_id GROUP BY name " +<br /> "ORDER BY COUNT(*) DESC LIMIT 5"</p> </blockquote> <p>into:</p> <blockquote> <p>@most_active_commenter = Comment.find_by_sql("SELECT author, website, " +<br /> "COUNT(author) as count FROM comments WHERE approved = 1 " +<br /> "GROUP BY author ORDER BY count DESC LIMIT 1")[0]<br /> @most_used_tags = Tag.find_by_sql "SELECT name, COUNT(*) AS count " +<br /> "FROM tags JOIN entries_tags ON tags.id = entries_tags.tag_id " +<br /> "GROUP BY name ORDER BY count DESC LIMIT 5"</p> </blockquote> <p>I think this should work.</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74516</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74516</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 20:07:34 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW,<br /> Thanks for the help so far… i still have no idea why the dashboard isn't working… it works just fine on the dev server on my pc. I have tried inserting the most active commenter script you gave above, i even tried deleting the whole 'dashboard' file and uploading it blank and still got an application error. This leads me to believe that something else is causing it perhaps?</p> <p>Any more ideas?</p> <p>Thanks for the incredible assistance so far,<br /> James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74476</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74476</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 17:14:59 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi James,</p> <p>First, for the "Add User" stuff: I see you added a "permission" field, but did you also add it in the database? It seems you set the permission in the form, but Chameleon is not able to write it to the database. Possibly, you still need to add the "permission" field in PHPMyAdmin, as a VARCHAR.</p> <p>Then, for the dashboard: change lines 23-24 in app/controllers/admin/dashboard_controller.rb to:</p> <blockquote> <p>@most_active_commenter = Comment.find_by_sql("SELECT author, website, " +<br /> "COUNT(author) as count FROM comments WHERE approved = 1 " +<br /> "GROUP BY author ORDER BY count DESC LIMIT 1")[0]</p> </blockquote> <p>This should normally work.</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74472</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74472</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 16:53:53 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW,<br /> To first sql query:</p> <div class="code"> <pre> <code>SQL query: Documentation SELECT author, website, COUNT( author ) FROM comments WHERE approved =1 GROUP BY author ORDER BY COUNT( author ) DESC LIMIT 0 , 30 MySQL said: Documentation #1111 - Invalid use of group function</code> </pre></div> <p>and the second seemed to execute fine:</p> <div class="code"> <pre> <code>MySQL returned an empty result set (i.e. zero rows). (Query took 0.0003 sec)</code> </pre></div> <p>James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74470</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74470</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 16:48:58 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW, Yea i would appear like that if i had of submitted something in the filelds… I just submitted that form as an example.<br /> Here is the source (minus the starting bumf):</p> <div class="code"> <pre> <code>&lt;div id="users_new" class="content edit"&gt; &lt;h2&gt;New user&lt;/h2&gt; &lt;form action="/admin/users/create" enctype="multipart/form-data" method="post"&gt; &lt;fieldset id="user_info"&gt; &lt;legend&gt;Basic information about the user&lt;/legend&gt; &lt;ol&gt; &lt;li class="left"&gt; &lt;label for="user_username"&gt;&lt;span class="accesskey"&gt;U&lt;/span&gt;sername:&lt;/label&gt; &lt;input accesskey="u" id="user_username" name="user[username]" size="30" type="text" /&gt; &lt;/li&gt; &lt;li class="right"&gt; &lt;label for="user_permission"&gt;Authorisation: &lt;/label&gt; &lt;select id="user_permission" name="user[permission]"&gt;&lt;option value="admin"&gt;Admin&lt;/option&gt; &lt;option value="writer"&gt;Writer&lt;/option&gt;&lt;/select&gt; &lt;/li&gt; &lt;li class="right"&gt; &lt;label for="user_email"&gt;&lt;span class="accesskey"&gt;E&lt;/span&gt;-mail:&lt;/label&gt; &lt;input accesskey="e" id="user_email" name="user[email]" size="30" type="text" /&gt; &lt;/li&gt; &lt;li class="left"&gt; &lt;label for="user_nickname"&gt;&lt;span class="accesskey"&gt;N&lt;/span&gt;ickname:&lt;/label&gt; &lt;input accesskey="n" id="user_nickname" name="user[nickname]" size="30" type="text" /&gt; &lt;/li&gt; &lt;li class="right"&gt; &lt;label for="user_website"&gt;&lt;span class="accesskey"&gt;W&lt;/span&gt;ebsite:&lt;/label&gt; &lt;input accesskey="w" id="user_website" name="user[website]" size="30" type="text" /&gt; &lt;/li&gt; &lt;li class="left"&gt; &lt;label for="newpassword1"&gt;&lt;span class="accesskey"&gt;P&lt;/span&gt;assword:&lt;/label&gt; &lt;input accesskey="p" id="newpassword1" name="newpassword1" type="password" value="" /&gt; &lt;/li&gt; &lt;li class="left"&gt; &lt;label for="newpassword2"&gt;Password (&lt;span class="accesskey"&gt;t&lt;/span&gt;wice):&lt;/label&gt; &lt;input accesskey="t" id="newpassword2" name="newpassword2" type="password" value="" /&gt; &lt;/li&gt; &lt;/ol&gt; &lt;/fieldset&gt; &lt;div id="user_submit" class="submit"&gt; &lt;input class="default" id="user_submit_save" name="commit" type="submit" value="Create" /&gt; &lt;input id="user_submit_cancel" name="commit" onclick="window.history.back();" type="button" value="Cancel" /&gt; &lt;/div&gt; &lt;/form&gt; &lt;div style="clear: both;" /&gt; &lt;/div&gt;</code> </pre></div> <br /> And here is a copy of the logs with something the fields: <div class="code"> <pre> <code>Processing UsersController#create (for 195.195.24.252 at 2007-11-28 12:41:07) [POST] Session ID: b7d6888734140e5f084cb2a26cdcb7eb Parameters: {"user"=&gt;{"nickname"=&gt;"Libby", "permission"=&gt;"writer", "username"=&gt;"libby", "website"=&gt;"", "email"=&gt;"*********@hotmail.co.uk"}, "commit"=&gt;"Create", "newpassword1"=&gt;"*****", "action"=&gt;"create", "newpassword2"=&gt;"*****", "controller"=&gt;"admin/users"} NoMethodError (undefined method `permission=' for #&lt;User:0x2cad620&gt;): /vendor/rails/activerecord/lib/active_record/base.rb:1789:in `method_missing' /vendor/rails/activerecord/lib/active_record/base.rb:1510:in `send' /vendor/rails/activerecord/lib/active_record/base.rb:1510:in `attributes=' /vendor/rails/activerecord/lib/active_record/base.rb:1509:in `each' /vendor/rails/activerecord/lib/active_record/base.rb:1509:in `attributes=' /vendor/rails/activerecord/lib/active_record/base.rb:1354:in `initialize_without_callbacks' /vendor/rails/activerecord/lib/active_record/callbacks.rb:236:in `initialize' /vendor/rails/activerecord/lib/active_record/base.rb:406:in `new' /vendor/rails/activerecord/lib/active_record/base.rb:406:in `create' /app/controllers/admin/users_controller.rb:29:in `create' /vendor/rails/actionpack/lib/action_controller/base.rb:941:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:941:in `perform_action_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in `perform_action' /vendor/rails/actionpack/lib/action_controller/base.rb:408:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:408:in `process_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in `process' /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 /usr/local/bin/mongrel_rails:16:in `load' /usr/local/bin/mongrel_rails:16</code> </pre></div> <p>(just starred appropriately)</p> <p>Thanks,<br /> James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74467</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74467</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 16:46:55 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>For the other error: what happens when you execute the following SQL query in PHPMyAdmin?<br /> SELECT author, website, COUNT(author) FROM comments WHERE approved = 1 GROUP BY author ORDER BY COUNT(author) DESC</p> <p>And does the following work?<br /> SELECT author, website, COUNT(author) as count FROM comments WHERE approved = 1 GROUP BY author ORDER BY count DESC</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74464</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74464</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 16:43:13 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>There is something weird in that log message for UsersController#create. Normally, the parameters you enter in the form should be there. I tried to create a user on my computer, and my log file starts like this:</p> <blockquote> <p>Processing UsersController#create (for 127.0.0.1 at 2007-12-01&nbsp;17:38:17) [POST]<br /> Session ID: 84b9922115356de2b2679304ba473b26<br /> Parameters: {"user"=&gt;{"nickname"=&gt;"", "username"=&gt;"", "website"=&gt;"", "email"=&gt;""}, "commit"=&gt;"Create", "newpassword1"=&gt;"", "action"=&gt;"create", "newpassword2"=&gt;"", "controller"=&gt;"admin/users"}</p> </blockquote> <p>Your log message doesn't have the parameters, and your request is a GET request instead of a post request. Could you maybe copy the source of the Add User page. (Go to Users &gt; Add User in your browser, right click, "View Source", and copy it.)</p> <p>JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74460</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74460</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 16:37:00 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Aha! You were right about the comments… i deleted all the comments using PHPMyAdmin and now that area is working fine,<br /> Thanks for that!</p> <p>James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74458</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74458</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 16:34:32 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>OK James. Oh, and I edited my previous post, thinking you would not read it that soon. But, meanwhile you already posted another post, so I'm sorry if it's confusing. We'll see what's in the log files, cause they seem to be the best place to look for answers.<br /> JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74457</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74457</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 16:33:51 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Here is the Users Controller log file again…<br /> Sorry i most likely missed that bit out for the reasons u mentioned above:</p> <div class="code"> <pre> <code>Processing UsersController#create (for 195.195.24.252 at 2007-11-28 12:41:13) [GET] Session ID: b7d6888734140e5f084cb2a26cdcb7eb Parameters: {"action"=&gt;"create", "controller"=&gt;"admin/users"} NoMethodError (undefined method `[]=' for nil:NilClass): /app/controllers/admin/users_controller.rb:28:in `create' /vendor/rails/actionpack/lib/action_controller/base.rb:941:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:941:in `perform_action_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in `perform_action' /vendor/rails/actionpack/lib/action_controller/base.rb:408:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:408:in `process_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in `process' /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 /usr/local/bin/mongrel_rails:16:in `load' /usr/local/bin/mongrel_rails:16</code> </pre></div> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74455</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74455</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 16:29:16 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW,<br /> That sql change didn't work… i must admit that what you thought was what crossed my mind when i had a quick look at the log file. I am working on getting the updated log to see what has changed… Still getting the same error… the oh so descriptive 'Application error'…</p> <p>Thanks for the help so far!</p> <p>James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74451</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74451</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 16:22:11 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>James,</p> <p>Some more research:<br /> - For the second one, the Manage comments page: is is possible there is a comment in your database that is connected to an entry that doesn't exist? Could you check your database to see that there are absolutely no comments at all, or at least only comments that have a valid entry_id.<br /> - For the last one, when creating a new user, a part of the production log is missing. Like the others, it should start with something like<br /> <tt>Processing UsersController#create</tt><br /> Try creating a new user again, and copy the last entry in the production log from that message to the end. Also, when doing that, don't use any real passwords or e-mail addresses since they will be in the message, and I and the rest of the world will be able to see them here.</p> <p>Greetings,<br /> JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74449</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74449</link>
				<description></description>
				<pubDate>Sat, 01 Dec 2007 16:14:23 +0000</pubDate>
				<wikidot:authorName>JW_00000</wikidot:authorName>				<wikidot:authorUserId>6757</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi James,</p> <p>Thanks for these logs, they seem to be very helpful. For the first one:<br /> in app/controllers/admin/dashboard_controller, on lines 23-24, there is written:</p> <blockquote> <p>@most_active_commenter = Comment.find(:first, {:select =&gt; "author, website",<br /> :order =&gt; "COUNT(author) DESC", :conditions =&gt; "approved = 1"})</p> </blockquote> <p>change this into:</p> <blockquote> <p>@most_active_commenter = Comment.find_by_sql("SELECT author, website, " +<br /> "COUNT(author) FROM comments WHERE approved = 1 GROUP BY author " +<br /> "ORDER BY COUNT(author) DESC LIMIT 1")[0]</p> </blockquote> <p>This should fix the error in the dashboard. If it doesn't, please copy the corresponding part of the production log again.<br /> For the other two bugs, I'm still looking, I'll let you know when I find a solution.</p> <p>Greetings,<br /> JW</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://chameleon.wikidot.com/forum/t-28692#post-74110</guid>
				<title>Re: Production problems with dashboard and comments</title>
				<link>http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments#post-74110</link>
				<description></description>
				<pubDate>Fri, 30 Nov 2007 16:10:21 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi JW!<br /> Thanks for the help so far… managed to recover some production logs. here are some of the relavent errors, hope you can help me decypher them?</p> <div class="code"> <pre> <code>Processing DashboardController#welcome (for 82.27.77.229 at 2007-11-23 11:18:32) [GET] Session ID: 517c5ac14f95df32a95bdf70f630d077 Parameters: {"action"=&gt;"welcome", "controller"=&gt;"admin/dashboard"} ActiveRecord::StatementInvalid (Mysql::Error: Invalid use of group function: SELECT author, website FROM comments WHERE (approved = 1) ORDER BY COUNT(author) DESC LIMIT 1): /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log' /vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:184:in `execute' /vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:336:in `select' /vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:175:in `select_all' /vendor/rails/activerecord/lib/active_record/base.rb:390:in `find_by_sql' /vendor/rails/activerecord/lib/active_record/base.rb:924:in `find_every' /vendor/rails/activerecord/lib/active_record/base.rb:918:in `find_initial' /vendor/rails/activerecord/lib/active_record/base.rb:380:in `find' /app/controllers/admin/dashboard_controller.rb:27:in `welcome' /vendor/rails/actionpack/lib/action_controller/base.rb:941:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:941:in `perform_action_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in `perform_action' /vendor/rails/actionpack/lib/action_controller/base.rb:408:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:408:in `process_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in `process' /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 /usr/local/bin/mongrel_rails:16:in `load' /usr/local/bin/mongrel_rails:16</code> </pre></div> <p>That was for the dashboard. The following is for comments.</p> <div class="code"> <pre> <code>Processing CommentsController#manage (for 90.199.54.232 at 2007-11-23 15:13:54) [GET] Session ID: 33a4db9c4eb15afca3b33eb56e9124cc Parameters: {"action"=&gt;"manage", "controller"=&gt;"admin/comments"} Rendering within layouts/admin Rendering admin/comments/manage ActionView::TemplateError (undefined method `permalink' for nil:NilClass) on line #36 of app/views/admin/comments/manage.rhtml: 33: &lt;/blockquote&gt; 34: &lt;%- if params[:view] == "approved" -%&gt; 35: &lt;p class="comment_view"&gt; 36: &lt;a href="&lt;%= comment.permalink %&gt;"&gt;View comment&lt;/a&gt; 37: &lt;/p&gt; 38: &lt;%- end -%&gt; 39: &lt;p class="comment_edit"&gt; #{RAILS_ROOT}/app/models/comment.rb:63:in `permalink' #{RAILS_ROOT}/app/views/admin/comments/manage.rhtml:36:in `_run_rhtml_admin_comments_manage' #{RAILS_ROOT}/app/views/admin/comments/manage.rhtml:16:in `each' #{RAILS_ROOT}/app/views/admin/comments/manage.rhtml:16:in `_run_rhtml_admin_comments_manage' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:316:in `send' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:316:in `compile_and_render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:292:in `render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:251:in `render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:726:in `render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:648:in `render_with_no_layout' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/layout.rb:245:in `render_without_benchmark' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:53:in `render' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:53:in `render' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:942:in `perform_action_without_filters' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in `perform_action' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:408:in `send' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:408:in `process_without_filters' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:377:in `process_without_session_management_support' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in `process' #{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 /usr/local/bin/mongrel_rails:16:in `load' /usr/local/bin/mongrel_rails:16</code> </pre></div> <p>The following arose when trying to create a new user:</p> <div class="code"> <pre> <code>NoMethodError (undefined method `permission=' for #&lt;User:0x2cad620&gt;): /vendor/rails/activerecord/lib/active_record/base.rb:1789:in `method_missing' /vendor/rails/activerecord/lib/active_record/base.rb:1510:in `send' /vendor/rails/activerecord/lib/active_record/base.rb:1510:in `attributes=' /vendor/rails/activerecord/lib/active_record/base.rb:1509:in `each' /vendor/rails/activerecord/lib/active_record/base.rb:1509:in `attributes=' /vendor/rails/activerecord/lib/active_record/base.rb:1354:in `initialize_without_callbacks' /vendor/rails/activerecord/lib/active_record/callbacks.rb:236:in `initialize' /vendor/rails/activerecord/lib/active_record/base.rb:406:in `new' /vendor/rails/activerecord/lib/active_record/base.rb:406:in `create' /app/controllers/admin/users_controller.rb:29:in `create' /vendor/rails/actionpack/lib/action_controller/base.rb:941:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:941:in `perform_action_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in `perform_action' /vendor/rails/actionpack/lib/action_controller/base.rb:408:in `send' /vendor/rails/actionpack/lib/action_controller/base.rb:408:in `process_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in `process' /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 /usr/local/bin/mongrel_rails:16:in `load' /usr/local/bin/mongrel_rails:16</code> </pre></div> <p>I have no idea what they could be and how they could be related?</p> <p>Thanks for the help,</p> <p>James</p> <br/>Forum category: <a href="http://chameleon.wikidot.com/forum/c-7965">Help / Support</a><br/>Forum thread: <a href="http://chameleon.wikidot.com/forum/t-28692/production-problems-with-dashboard-and-comments">Production problems with dashboard and comments</a>
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>