Closed (duplicate)
Project:
PEAR Wiki Filter
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
21 Jul 2008 at 16:05 UTC
Updated:
10 Sep 2008 at 07:27 UTC
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
Comment #1
sibidiba commentedI 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.
Comment #2
nterbogt commentedThis is actually a duplicate of #264772: make user's page cutomizable like on myspace on 6.2 and has the same fix.