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.
When i created custom action i get this error (always when page was refresh):
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 'N u.fid = f.fid WHERE f.filepath ='sites/default/files/imagecache_sample.png' at line 1 query: SELECT nid, f.fid FROM lagerbille_upload AS u INNER JOIN lagerbille_files AS f N u.fid = f.fid WHERE f.filepath = 'sites/default/files/imagecache_sample.png' LIMIT 1 w pliku /srv/http/quex/www/la-gerbille/sites/default/modules/imagecache_actions/utility.inc, linia 275.
Problem was in this line:
$sql = "SELECT nid, f.fid FROM {upload} AS u INNER JOIN {files} AS f N u.fid = f.fid WHERE f.filepath = '%s' LIMIT 1";
A small typo, a lack of O in AS fON. Correct line should look like this:
$sql = "SELECT nid, f.fid FROM {upload} AS u INNER JOIN {files} AS f ON u.fid = f.fid WHERE f.filepath = '%s' LIMIT 1";
Comment | File | Size | Author |
---|---|---|---|
#1 | utility.inc-491038.patch | 554 bytes | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedDitto
Comment #2
dman CreditAttribution: dman commentedYeah thanks.
Sorry about that.
I've been meaning to revisit the whole get-data-from-filename lookup strangeness and ended up with a whole 'nother module doing a whole 'nother thing with metadata ... and forgot that this was the original reason.
Anyway. Thanks for the bug reports. I'm rolling this into dev now.
I've got some other things in mind to put in before a number release, but it may happen in a little while.
So - fix is in, but I'll leave the issue open 'till the stable release gets rolled.
.dan.
Comment #3
Cyberwolf CreditAttribution: Cyberwolf commentedSubscribing
Comment #4
nemchenk CreditAttribution: nemchenk commentedStill there in 6.x-2.0-beta10...
Comment #5
FiNeX CreditAttribution: FiNeX commentedFixing the typo on the SQL query is enough to fix the bug.
I hope the fix will be applied.
Thanks!
Comment #6
dman CreditAttribution: dman commentedfinally released a version for the fix that had been sitting in dev. I versioned it a month or more ago but never 'published' on d.o