Hi,

entering a Wikilink to an existing image in the format [[Image:My image]] results in the following error:

user warning: Unknown column 'f.nid' in 'on clause' query: SELECT n.nid, n.title, f.filename, f.filepath FROM node n LEFT JOIN files f ON n.nid = f.nid WHERE n.status = 1 AND n.type = 'image' AND LOWER(n.title) = LOWER('My image') LIMIT 1 in /var/www/drupal/sites/all/modules/pearwiki_filter/pear_override/render/Xhtml/Image.php on line 58.

Thanks & greetings,
-asb

Comments

sibidiba’s picture

Assigned: Unassigned » sibidiba
Priority: Normal » Critical
Status: Active » Needs review

I can confirm this.

Change the query in file modules/pearwiki_filter/pear_override/render/Xhtml/Image.php at line 58 to this:

SELECT n.nid, n.title, f.filename, f.filepath FROM {node} n JOIN {image} i ON n.nid = i.nid JOIN {files} f ON i.fid = f.fid WHERE n.status = 1 AND n.type = 'image' AND LOWER(n.title) = LOWER('%s') LIMIT 1

After that you get:

Fatal error: Unsupported operand types in /home/czigola/public_html/online/includes/common.inc on line 1265.

In the same file at line 68 there is a call to the function url, but with a signature belonging to Drupal API v5!

Change this line to:

$options['attr']['link'] = url("node/$image->nid", Array());

. Now it works.

nterbogt’s picture

Status: Needs review » Closed (duplicate)

This is actually a duplicate of #264772: make user's page cutomizable like on myspace on 6.2 and has the same fix.