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";
CommentFileSizeAuthor
#1 utility.inc-491038.patch554 bytesmikeytown2
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

Status: Fixed » Needs review
FileSize
554 bytes

Ditto

dman’s picture

Status: Needs review » Reviewed & tested by the community

Yeah 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.

Cyberwolf’s picture

Subscribing

nemchenk’s picture

Still there in 6.x-2.0-beta10...

FiNeX’s picture

Fixing the typo on the SQL query is enough to fix the bug.

I hope the fix will be applied.

Thanks!

dman’s picture

Version: 6.x-1.6 » 6.x-1.7
Status: Reviewed & tested by the community » Fixed

finally 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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.