Currently only images from image nodes using the image module are allowed for including using the [[Image:name]] syntax.
The attached patch allows images attached to a node to be included using the [[Image:name]] syntax.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | turn_off_image_module.patch | 2.2 KB | adam-griffiths |
| Use_Attached_Images.patch | 1.65 KB | fuerst |
Comments
Comment #1
fuerst commented(corrected title of the issue)
Comment #2
asb commentedHi how do I apply this patch?
Running this patch from
/var/www/sites/all/modules/pearwiki_filter/pear_override/parse_mediawikiresults in:Running this patch from
/var/www/sites/all/modules/pearwiki_filter/pear_override/render/Xhtmlresults in:Thanks & greetings, -asb
Comment #3
fuerst commentedUsing a plain vanilla 6.x-1.0-beta1 go to pearwiki_filter/pear_override/render/Xhtml and run
patch < Use_Attached_Images.patchComment #4
asb commentedIsn't that exactly what I described in #2?
Confused, -asb
Comment #5
fuerst commentedSorry - did not explain enough: I downloaded PEAR Wiki Filter 6.x-1.0-beta1 and the patch above, changed directory to pearwiki_filter/pear_override/render/Xhtml and run the path using the command
patch < Use_Attached_Images.patch. The patch run through without any error.This are the steps in detail:
Result of patch command was: patching file Image.php which means success.
I don't know why you got the error. Can only imagine you don't use PEAR Wiki Filter 6.x-1.0-beta1.
Comment #6
adam-griffiths commentedHere is another patch that I think corrects the root cause of the problem in the pearwiki_filter/pearwiki_filter.module file. It fixes an issue that the drupal forms api was not being correctly used for the pearwiki_filter.
Here are the steps I used to fix things:
1. Apply this patch then go to Administer › Site configuration › Input formats and click configure the input format that you created for your wiki, then switch to the configure tab. (takes you to the "/admin/settings/filters/n/configure" page).
2. Scroll down to the bottom and in the "Images" group ensure that the "Use image module?" is unchecked. (note the "Base path for images" setting here is important too).
3. Click the "Save Configuration" button to save (yes, even though you havn't edited anything you should click this button because the setting may still be incorrect in the database due to the problem the patch fixes).
4. Attaching images and using the [[image:name.jpg|caption]] syntax should now work. You may want to check you "Base path for images" setting (go back to step 2 above) if not.
PS how can I/we get these patches incorporated into the core code and a new release? I'm happy to do it if someone is willing to give me the CVS access?
Comment #7
adam-griffiths commentedI thought I would also mention the attached patch above also fixes the following problem:
You have drupal setup without the image module. You configure a pear wikifilter and create a new node using it. You attach a file using the core upload module and attempt to include that file in your node using the wiki syntax [[image:name.jpg|caption]].
You get this 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('MWSnap013.jpg') LIMIT 1 in /opt/drupal-6.10/sites/all/modules/pearwiki_filter/pear_override/render/Xhtml/Image.php on line 58.This is because without the image module installed the tables in the database are not setup for this query to work. The patch in #6 fixes it becuase once you unckeck "Use image module?" and save the setting the query above will not be executed and the problem will not occur.
Comment #8
asb commented@adam-griffiths:
Please have a look at this issue: PEAR Wiki Filter appears to be abandoned.
Would you be willing to take over maintainership or co.-maintainership of the module?
Thanks & greetings,
-asb
Comment #9
adam-griffiths commentedI have applied the patch (http://drupal.org/node/455100#comment-1899124) to the latest code in CVS.
Comment #11
Avrim commentedI have applied the Patch. However, it has caused some side effect.. I could not see my ADMIN MODULE page .. when I click on ADMIN Module I get BLANK PAGE