Re: [Radiant] site_watcher error

2009-03-10 Thread Jim Gay


On Mar 10, 2009, at 5:47 AM, Elle Meredith wrote:


Hello again,

I installed the site_watcher extension and ran the migration. When  
going to the dashboard I get this error:


ActiveRecord::StatementInvalid in Admin/dashboard#index
Showing vendor/extensions/site_watcher/app/views/admin/dashboard/ 
_popular_pages.html.haml where line #1 raised:


Mysql::Error: You have an error in your SQL syntax; check the manual  
that corresponds to your MySQL server version for the right syntax  
to use near 'ignore is NULL or ignore = 0))  ORDER BY count_created  
DESC, virtual ASC LIMIT 2' at line 1: SELECT * FROM  
`page_requests` WHERE (count_created  1 and (ignore is NULL or  
ignore = 0))  ORDER BY count_created DESC, virtual ASC LIMIT 25


Extracted source (around line #1):

1: - @popular_pages = PageRequest.find_popular
2: - unless @popular_pages.blank?
3:   #popular_pages.dashboard_module
4: %h2 Popular Pages

Trace of template inclusion: /vendor/extensions/dashboard/app/views/ 
admin/dashboard/index.html.haml

...

I haven't touched haml before, so a bit unsure how to proceed.


The error is coming from the SQL generated in the  
PageRequest.find_popular method.
I don't generally use MySQL, so I never saw this until now, but I've  
fixed it and it should work for you if you pull the latest from github.


-Jim


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] site_watcher error

2009-03-10 Thread Yves Dufour
Hi Jim did you tried to run the SQL command in a console (in  
phpmyadmin) to see what's wrong and what should be the correct  
command ...


erwin
On 10 Mar 2009, at 14:28, Jim Gay wrote:



On Mar 10, 2009, at 5:47 AM, Elle Meredith wrote:


Hello again,

I installed the site_watcher extension and ran the migration. When  
going to the dashboard I get this error:


ActiveRecord::StatementInvalid in Admin/dashboard#index
Showing vendor/extensions/site_watcher/app/views/admin/dashboard/ 
_popular_pages.html.haml where line #1 raised:


Mysql::Error: You have an error in your SQL syntax; check the  
manual that corresponds to your MySQL server version for the right  
syntax to use near 'ignore is NULL or ignore = 0))  ORDER BY  
count_created DESC, virtual ASC LIMIT 2' at line 1: SELECT * FROM  
`page_requests` WHERE (count_created  1 and (ignore is NULL or  
ignore = 0))  ORDER BY count_created DESC, virtual ASC LIMIT 25


Extracted source (around line #1):

1: - @popular_pages = PageRequest.find_popular
2: - unless @popular_pages.blank?
3:   #popular_pages.dashboard_module
4: %h2 Popular Pages

Trace of template inclusion: /vendor/extensions/dashboard/app/views/ 
admin/dashboard/index.html.haml

...

I haven't touched haml before, so a bit unsure how to proceed.


The error is coming from the SQL generated in the  
PageRequest.find_popular method.
I don't generally use MySQL, so I never saw this until now, but I've  
fixed it and it should work for you if you pull the latest from  
github.


-Jim


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] site_watcher error

2009-03-10 Thread Jim Gay


On Mar 10, 2009, at 9:48 AM, Yves Dufour wrote:

Hi Jim did you tried to run the SQL command in a console (in  
phpmyadmin) to see what's wrong and what should be the correct  
command ...


The error is in the message below with the full SQL query.
I tried running it in a mysql GUI and just added back ticks around the  
`ignore` fields and it worked.

Here's the the change 
http://github.com/saturnflyer/radiant-site_watcher-extension/commit/757f273b6051d286ea04d92443c1d31e74d4a726


erwin
On 10 Mar 2009, at 14:28, Jim Gay wrote:



On Mar 10, 2009, at 5:47 AM, Elle Meredith wrote:


Hello again,

I installed the site_watcher extension and ran the migration. When  
going to the dashboard I get this error:


ActiveRecord::StatementInvalid in Admin/dashboard#index
Showing vendor/extensions/site_watcher/app/views/admin/dashboard/ 
_popular_pages.html.haml where line #1 raised:


Mysql::Error: You have an error in your SQL syntax; check the  
manual that corresponds to your MySQL server version for the right  
syntax to use near 'ignore is NULL or ignore = 0))  ORDER BY  
count_created DESC, virtual ASC LIMIT 2' at line 1: SELECT * FROM  
`page_requests` WHERE (count_created  1 and (ignore is NULL  
or ignore = 0))  ORDER BY count_created DESC, virtual ASC LIMIT 25


Extracted source (around line #1):

1: - @popular_pages = PageRequest.find_popular
2: - unless @popular_pages.blank?
3:   #popular_pages.dashboard_module
4: %h2 Popular Pages

Trace of template inclusion: /vendor/extensions/dashboard/app/ 
views/admin/dashboard/index.html.haml

...

I haven't touched haml before, so a bit unsure how to proceed.


The error is coming from the SQL generated in the  
PageRequest.find_popular method.
I don't generally use MySQL, so I never saw this until now, but  
I've fixed it and it should work for you if you pull the latest  
from github.


-Jim

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant