-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"useslash" option breaks "Orphanmedia", all paths parsed incorrectly? #11
Comments
please provide an example of such media link syntax and if it is inside other tags (e.g. ) PS: I'll work on UNC path issue after point 1 is solved |
Please check if the new version resolves your point number 1 and provide syntax examples for points 2 & 3 |
I'll cite a page that's not been modified by me, since they seem to be throwing errors as well. Using compare, there are zero differences between my copy of :wiki:syntax page and this one http://www.dokuwiki.org/syntax The author's method of usage is typical: {{wiki:dokuwiki-128.png}} but the resolution by Orphanmedia fails. Orphanmedia shows: http://i.imgur.com/iatIZ.gif As confirmation, the page does display correctly, and I do have "dokuwiki-128.png" in the correct location. I will test the new version and report back, Thank you for your fast response. |
STOP, there is a new bug I've just implemented. |
Noted. It also does not appear that this version changes the output from Orphanmedia. Apologies, in several places I've noticed that http://www.dokuwiki.org/plugin:smblink smblink is in usage. This may be in relation to those using UNC paths. The large majority of the media are direct uploads into DW not UNC. I am not familiar enough with the plugin structure to know the interrelation between Orphanmedia and smblink. |
useslash does still not work but now I know wher the problem is ... |
Just solved a fatal error on Configuration Management caused by faulty config file ... orphanmedia first has to learn how to detect smblinks and how it can be checked. The link seem to be very helpful but I've to doe some further analysis. |
I tested around with your {{wiki:dokuwiki-128.png}} issue. Copied the syntax page, stored the pictures into proper media folder, all that things. Additionally I've uses slashes and canonical urls with different combination. On my system it is working like a charm. Regarding smblinks. I created a share of a local folder and implemented the link to a picture as explained on DW syntax page (http://www.dokuwiki.org/syntax#windows_shares). It is displayed as a share. Unfortunately if I click on the link nothing happens (I'm using IE9). I don't know what should happen but I expect that something it does (?) Are you using the smblink plugin ? What happens if you click on such a link ? What browser you are using, FF or IE ? |
I am going through my configuration and disabling addons then re-running orphanmedia to see if I can get it to generate a different result to test if it is an addon at fault or strictly a result of my configuration. Is there a cache or similar that I I should clear between viewings of the orphanmedia page? We are using a mix of IE9, FF and Chrome. Through we don't just link to the raw shares, we link to files in them. In IE9, clicking a UNC share will prompt you to Open or save the file and it will then open the file in the associated program. In Chrome/FF it'll just save it. I'm compiling screenshots. |
Orphan media itself is not caching anthing but DokuWiki cache seems sometimes a tricky thing. There are two cache functions implemented. One for the Text output and another one for the functios. I've not experienced a cache influence to orphanmedia but that is not a guarantee. regarding your point 2 regarding shares: |
I'll add the nocache tag to the same page as orphanmedia, I think that should handle any potential caching issues with DW, it will induce overhead on reloads of that pages but should insure that the information is accurate. (I've enabled this as well, and saw no change in my output.) Going down the list of addons, I didn't see any immediate change but I was concerned with the cache giving me stale information, I was waiting until I'd heard back. Turning off "useslash" would be a drastic change, as it caused instability initially and this is a live system. I'll evaluate making that change tonight and maybe late into the evening when I can kill time if I take down the wiki/restore it from a backup if it goes down. Regarding the shares, make sure you're linking to a file. In FF you get a message: Then immediately following that you get a message (which is what pops up immediately in Chrome) I believe this message is enabled by: I have uploaded several test files using UNC method and tested them without the smblink addon, this is the result I see: In the red box, I've copied the formatting from the wiki, trimming the domain and such. I tried it with and without a description, both files were shown as missing. |
Unfortunately not. As mentioned before, DW has two cache mechanism. NOCACHE refers only to the html output and effects text, pictures, styl, etc. It does not effect the functions cache. Just to explain it but that is not the root cause here. I'm sorry, I'm a bit confused where we are. I've lost the overview. Could you please just summarise me the status regarding:
Is that still the case ? Are these Media files you referring stored locally into dw/data/media/... or do we talking only about smblinks ?
Do we still have this path mismatch also after last plugin update a few days ago. The path displayed within your last picture seems to be ok (Is there an path error I missed ?)
Isn't that the same question as point 2 ? |
The colon interpreted as a slash issue is gone. So, if I need to file another bug report under a different title for what I'm experiencing, I will. I apologize that the issues seems to have skewed. This is the output of OrphanMedia currently: I think this information comment may have been brushed over but I feel it's very important: So, no, the files are not in that path. They are relocated. If Orphanmedia abides by the "savedir" config option, then everything should be ok. |
Thanks for the picture (excellent) and the savedir hint (very helpful, I never mind on savedir). |
Found the code-line disturbing the useslash setting and modified this. |
during review found a second code-line disturbing the useslash setting and modified this. Hope that helps your issue. |
Just an FYI: The latest update causes a 500 Internal Error on any page I load it on, can't explain why. I was writing this update below as you posted that new code: Glad the picture helped. In syntax.php:104, I've gone through and added a few debugging echos and it doesn't seem like "savedir", mediadir", or "pagesdir" ever make it to the page, they always echo empty. $media_file_path does just fine as does any number of the DOKU_ variables and so on. But I think the reason the savedir isn't being removed from the strings is because the variable is simply blank when the routine calls for it. The actual function of "savedir" is described here: http://www.freelists.org/post/dokuwiki/more-cleanup-questions,5 but it doesn't seem that it's a global variable that can be called upon: http://www.dokuwiki.org/devel:environment The code you added (previous to 500 Error) seems like it's sound and might be a fix, but I can't tell since the variables (mediadir & pagesdir) are empty. Back on my image from the other day; I also noticed (as you can see on line number 1, 2 and 106 through 108 of my picture) that there is a slash missing in front of "departments." If that is the same string it is evaluating for the path, then might that cause it to fail since it's starting from the wrong place. Shouldn't it begin with a "/" or a ":"? Just some ideas. |
Just as a sidenote, adding "&do=debug" shows that in the array $conf all three variables are there. Should be able to access them by that means. I am also off on vacation for a week as of today. I will be able to respond after then. Have a great week! |
so, you are out for holidays and I have the pain ... ;-) |
Hard to say what the root cause of a 500 Internal Server Error is. You updated the orphanmendia plugin so I would blame it. The error may be caused by exceeding the Memory threshold (php.ini => memory_limit). All Orphanned pictures will be previewed (if type of jpg, png, gif). If the plugin detects all your pictures as orphan it might exceed the memory limit .... Problem could be raised by client side resizing of the picture. I have to investigate this. Also I will implement a config paramter to prevent preview of more than x pictures. Lets hope your 500 Internal Server Error will disappear. I'll do the mod and upload the changes. |
Alright, back from my travels and back onto debugging. Hope your week vacation from my bug was nice! The 500 error seems to appear when using a 'broken' plugin for some reason. I can't explain much more than that as any plugins that fail to load, or have code that doesn't pass as PHP seems to exhibit a 500 error to the end user since any page view also loads any plugins that might be needed to display it correctly. The PHP memory limit is set at 512MB. Haven't had problems with anything else so far. Have not implemented the new code yet. I did notice this while looking through the debug information, take note of the change in types of slashes used: Page: http://foo.com/wiki/orphanmedia?do=debug I'll download the latest version, I assume it's been updated to read the variables in the $conf['savedir'] method. |
Please update the plugin on your set-up and set the new config parameter. Sorry I cannot find such problem on my set-ups so it is impossible for me to trace anything regarding this. Therefore I'm asking you to check if that 500 error still occur after the update. If so than please delete the orphan plugin and check again. If the 500 error still is coming up than it is caused by something else (not fair but my hope ;-). |
Updated Plugin. "500" issue didn't come back, however I had to delete the page with the ~~ ORPHANMEDIA:all ~~ embed before DW would update, I was given the same page over and over despite having purged everything. Sadly not much has changed in the output: |
"500" issue didn't come backThat is a progress I guess. Have you used the new parameter, what value ? Output Image - MissingAre all other findings correct (beside those 2 you marked with a box) ? Which of the files within the picture are wrongly detected as missing ? Output Image - OrphanThe title of the orpahn document in preview seems to be ok just the link is mismatched. The path provided in column 2 seems to be correct also. Is this file referenced on a page or is it really orphan ? Can you open the doc by putting the path into your browsers address field ? It is really hard to find a root cause without having access to the pages. There are so many questions which cannot be handled properly in here. Is there any way of a remote access r.g. by team viewer that we together might have a look on it ? |
500 Issue - I can only assume this was a quirk here. It can be ignored. The new parameter is set to it's default value of 10. As the title block states, all the files are shown as missing, I've truncated the page, I apologize, I should have said as much, I didn't feel it was necessary to give you a long page. At the moment I'm doing a replace on the page to remove internal information so occasionally I may mistype. The is the reason why I haven't suggested a 'team viewer' type method. If there's a faster, less public means maybe something can be worked out, I'm all ears but the plugin reveals more information than I can give out (thus the reasoning behind "foo.com") |
Seems that using the feature, "useslash" (useslash - Use slash as namespace separator in URLs) which improves readability for our largely IE user base (Based on documentation this should be just a character replacement feature and should not be used in actual pathing as namespace structure is still used everywhere (e.g. :wiki:intro)) breaks the links to images/media as anywhere colons are found, they break the plugin (or at least that's my best guess) and I get one of three conditions:
Path Shown:
http://server.foo.com/wiki/lib/exe/detail.php?media=::foo.com:main:this%20office:wiki:data:media:department:menu.jpg
versus the correct namespace path that DOES work:
http://server.foo.com/wiki/lib/exe/detail.php?media=:department:menu.jpg
Configuration:
Server: IIS 7.5 (Windows 2008 R2)
PHP: v5.3.8
Dokuwiki: Angua Release.
Data: Located on UNC path outside of webroot.
Images:
UNC path to file (multiple slashes are required for PHP, but the colon is turned into a slash): http://i.imgur.com/NLOhI.gif
Standard Dokuwiki image: http://i.imgur.com/XvUMv.gif
/Apologies for the multiple edits, I just keep digging.
The text was updated successfully, but these errors were encountered: