Sql error using Piclens with Acidfree
mennonot - April 21, 2008 - 16:26
| Project: | Cooliris (PicLens formerly) |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I'm using the April 20 build of Piclens 5.x-1.x-dev along with Image 1.8 and the latest (April 1st) build of Acidfree. The good news is that the configuration settings page does appear. However, when I turn on the piclens lite javascript and link, and try clicking the Piclens lite link in an album, it says, "This site does not yet support Piclens". Furthermore, with the Piclens firefox plug-in installed I do not see any link in the corner of images.
This error appears when viewing images and albums
user warning: 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 '<default>' at line 1 query: SELECT n.nid FROM term_node t INNER JOIN node n ON t.nid = n.nid WHERE n.status = 1 AND n.type = 'image' AND t.tid = 88 ORDER BY <default> in .../includes/database.mysql.inc on line 172.It also sometimes appears on the next page loaded after loading an image. Thanks in advance for any help with this. Do I need to be using Image 2.x for this module to work?

#1
I allready see where the error is coming from. In acidfree, you have an option where you can choose the order of the images, and by default it stores '<default>' into the database. I'll fix that this weekend. Normally you can make the errors go away by choosing something different then 'global settings' in the 'Sort album by:' select box.
And image 1 or 2 is fine, that's not the root of the problem.
#2
In fact, the fix was so trivial codewise, it's allready commited to the Drupal 5 branch. Next built fixes this.
(reopen if it somehow didn't)
Thanks for the report!
#3
Hi swentel!
Thanks a lot for fixing this! I think that the fix is not perfect, though. You set the order to "Latest post first" if it was set to <default> before:
<?phpif ($acid->order_by == '<default>') $acid->order_by = 'node.nid DESC';
?>
The correct behaviour in my opinion should be to set it to what the user choosed to be the default order:
<?phpif ($acid->order_by == '<default>') $acid->order_by = variable_get('acidfree_order', 'node.nid DESC');
?>
I hope you agree with me and fix it in the next version :-) Thanks!
Cheers, Ingo
#4
will look into this soon. Hi from the new maintainer.