Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On a fresh install openning newly created gallery's sort page (http://mysite.com/node/21/sort) gives error message:
warning: array_fill() [function.array-fill]: Number of elements must be positive in /usr/drupal/includes/database.inc on line 253.
warning: implode() [function.implode]: Invalid arguments passed in /usr/drupal/includes/database.inc on line 253.
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 ')' at line 1 query: SELECT n.nid,n.title,n.status,n.created,n.changed,f.filepath,ngi.weight FROM node n INNER JOIN node_revisions r ON r.vid = n.vid INNER JOIN content_type_node_gallery_image cck ON cck.nid = n.nid INNER JOIN files f ON f.fid = cck.field_node_gallery_image_fid INNER JOIN node_gallery_images ngi ON ngi.nid = n.nid WHERE n.nid IN () in /usr/drupal/sites/all/modules/node_gallery/node_gallery.inc on line 370.
Comment | File | Size | Author |
---|---|---|---|
#1 | ng3-get-images-quickfix2.patch | 916 bytes | scroogie |
Comments
Comment #1
scroogie CreditAttribution: scroogie commentedThanks for reporting. My fault. Here is the fix.
Comment #2
justintime CreditAttribution: justintime commentedCommitted to dev for inclusion in alpha2. If you're a user running into this bug on alpha1, note you don't need to upgrade to dev, just add an image to the gallery and the sort page will work.
@scroogie, I modified your code a bit so that we return an empty array instead of NULL.
Comment #3
parasox CreditAttribution: parasox commentedWas about to report the same (similar?) thing.. My error code is slightly different, so figured I should post it here.
Comment #4
justintime CreditAttribution: justintime commentedThanks @parasox - it's the same bug with the same fix and workaround. This was on an empty gallery, correct?
Comment #5
parasox CreditAttribution: parasox commentedYeap, just if you click sort when there are no images.