Closed (fixed)
Project:
IMCE
Version:
5.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jan 2007 at 22:34 UTC
Updated:
20 Feb 2007 at 08:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
ufku commentedyes "/" means your files directory.
your bug report is what a bug report shouldn't be :)
isn't there any specific point you want to share?
tested with different browsers? with any starting folder other than main folder? with a different user?
see any javascript errors? created folders with sub-folder tool?...
Comment #2
Boletus commentedTested with Opera 9.01, Firefox 2.01 and IE 6. Windows XP sp2.
No javascript errors as I can see.
I've tried to enter a subfolder in the settings. It works, but I can't navigate upwards.
I have not created the subfolders in the IMCE settings. Could that be a factor?
Comment #3
ufku commentedmanually created directories could be problematic but the error wouldnt be silent. i think there is a problem with that cloudy slash situation.
please try the patch that handles it in a more correct way.
Comment #4
Boletus commentedI'm not that good with patches. Could you talk me through it? At what line should I change the code?
Comment #5
Boletus commentedI added the line, as below. And commented out the original line. Is that correct?
I still can't navigate sub-menus. Am I supposed to change anything in the IMCE settings?
Comment #6
ufku commentedyes it removes the extra // from the end of the directory name. the slashes are harmless in general but i thought yours was a special case. i was wrong.
can you send me the html sources of your main imce pages when you set the folder to / and when you set the folder to any subdirectory.
in the meantime you can check if there is any difference when you change your file download method(private-public switch) and when you login with a different user whose main folder is /.
Comment #7
Boletus commentedSorry, I forgot to subscribe to this issue. I did not see your answer until now. I'll send you the code as soon as I can.
Comment #8
Boletus commentedI been up to my neck in work. Sorry. I moved my drupal installation from a subfolder www.example.com/drupal/ to www.example.com. Now the subfolder navigation IMCE works. I don't know if that is a clue or not?
Comment #9
Boletus commentedBy the way, I did not change any of the IMCE settings after I moved the site.
Can it have to do something with the Base URL (optional) in the settings.php file for the site? I didn't enable that URL.
Comment #10
ufku commentedsubfolder installation was the key to the bug. yes you found it. IMCE used $_SERVER['DOCUMENT_ROOT'] variable to get the relative file path, which results in an incorrect path with a sufolder installation. Now the relative path is obtained using the script path.
I'll commit the attached patch if you confirm the problem is over.
(Patch replaces line 787 with
$root = str_replace('\\', '/', ($root ? realpath($root) : dirname($_SERVER['SCRIPT_FILENAME'])));)Comment #11
ufku commentedComment #12
ufku commentedadded missing realpath.
Comment #13
ufku commentedcommited.
Comment #14
(not verified) commented