[92]   Plugin ORPHANMEDIA lists all medias as orphan

Creator: Hans-Jürgen Schümmer Created: 2012-05-06 19:30:39
Assigned to: Taggic Modified: 2012-05-14 11:02:13
Severity: Query Query Project: fcon_project
Status: Solved Solved
Product: Orphan Media Begin:
Version: 2012-02-05 Deadline:
Component: Progress in %:
Target version:
Test blocking: YES
Creator Details
Initial description
in my Wiki, there are a lot of pictures in several namespaces. The pictures are defined by syntax like {{easydm_einfuehr_01.png}}. As I use the same namespaces for pages and media it works well in DokuWiki. Now I want to use the ORPHANMEDIA-Plugin with the command ~~ORPHANMEDIA:orphan:png~~, but I get a list of all my pictures as being orphan. I tried to redefine the picture-syntax to values like {{richtlinien_fak:verwaltung_mit_sap:dokumentverwaltung:easydm:einfuehrung:easydm_einfuehr_01.png}} or {{:richtlinien_fak:verwaltung_mit_sap:dokumentverwaltung:easydm:einfuehrung:easydm_einfuehr_01.png}}, but it has no effect on the result. What goes wrong, what can I do to use this great plugin?
Greetings from Juergen


Comments (work log)
Hi Jürgen,

I've got some questions regarding your system and configuration before I'm able to start analyzing your issue.

  1. Is your wiki public and I can have a look on it ? That could ease-up the analysis.
  2. What DokuWiki version you are using ?
  3. What are the values of:
    • savedir (Directory for saving data)
    • basedir (Server path [blank for auto detection])
  4. What is your user role on execution (should be admin) ?
I'm assuming that your wiki is displaying the pictures.

Hi Taggic,

thank you for your demand. Here are my answers:
Unfortunately it' not a public wiki.
Wiki-Version = Release 2012-01-25a "Angua",
savedir = ./data
basedir = [blank]
The type of my role is admin
It's right, that the wiki is displaying the pictures.

Greetings from Cologne
Hi Jürgen,

please have a look on your media directory. Are your picture filenames containing really the underscore or do they have blanks instead (DokuWiki is turning them automatically into underlines by usage of Media Pop-up/Manager on Editor) ?

Orphanmedia is currently not able to turn the underlines back into blanks (or checking all possible filename combination of blanks/underlines). That definitely is a disadvantage I have to think about.

best regards
To overcome the blank character issue you may use following as a HotFix.
Please open the syntax.php with an editor able to show line numbers (e.g. PSPad, HexEdit)
Insert after line 105 following code:

// underline maybe a blank on windows systems
// so we have to replace the blanks of $media_file_path by underline characters
$media_file_path = str_replace(" ","_",$media_file_path);

This turns all blanks within a filename of the media-directory into an underline character (for comparison only, files keeping untouched).
Hi Taggic,

thanks for the hotfix, but it still doesn't work.

But I have the solution: When I tested, I wanted to speed up the performance. On the relevant Wiki-page I used the orphanswanted plugin and further on your orphanmedia plugin. I deleted the command ~~ORPHANSWANTED:orphans~~, and surprisingly the result of the orphanmedia was correct.

best regards

Hi Jürgen,

many thanks for that feedback which will be added to the FAQ section of the plugin. Sorry for my late replay but I'm currently in an hand-over phase of a project what consumes most of my time.

best regards
FAQ section created
Please Sign in if you want to add a comment or resolution note.
issuetracker/issuelist.txt · Last modified: 2014/04/30 09:36 (external edit)

This Wiki is hosted and ruled by Policies of Frister Consultancy Services.
By using this wiki you accept these rules. -> Impressum