Bug #20031
closed
tree of pages doesnt work when BE main dir/symlink is changed
Added by Tomasz Krawczyk almost 16 years ago.
Updated over 13 years ago.
Description
When I upgraded from 4.1.5 to 4.2.5 with success. No errors and warnings. When I changed typo3 symlink and TYPO3_mainDir in four files mensioned in "Changing the default “typo3/” directory" the pages tree in middle column in BE doesnt expand.
FireBug says that in file http://mysite/typo3/ajax.php?ajaxID=SC_alt_db_navframe (...) error has occurred
<b>Warning</b>: t3lib_div::require_once(/home/tommy/public_html/typo3/alt_db_navframe.php) [<a href='t3lib-div
.require-once'>t3lib-div.require-once</a>]: failed to open stream: No such file or directory in <b>/home
/tommy/public_html/typo3_src-4.2.5/t3lib/class.t3lib_div.php</b> on line <b>4687</b><br />
<br />
<b>Fatal error</b>: t3lib_div::require_once() [<a href='function.require'>function.require</a>]: Failed
opening required '/home/tommy/public_html/typo3/alt_db_navframe.php' (include_path='.:/usr/lib/php:/usr
/local/lib/php') in <b>/home/tommy/public_html/typo3_src-4.2.5/t3lib/class.t3lib_div.php</b> on line
<b>4687</b><br />
There is no typo3 directory in my public_html and alt_db_navframe.php exists in my secret directory. So i suspect that somewhere typo3/ is hardcoded.
(issue imported from #M10458)
Files
Attached a simple patch that fixes this for me in trunk (changing hardcoded typo3/ to TYPO3_mainDir constant in config_default.php).
There are some lines in template.php that adapt the scriptID if TYPO3_mainDir has been changed (function template, line 237), but I do not really understand the impact of this. So I do not know if attached patch is the right way or if its just a hack.
I confirm it works! Files t3ib/config_default.php in versions 4.2.5 and 4.2.6 are the same. It should work also in version 4.2.8.
Thanks for patch.
Sorry this patch is far from beeing complete.
Running a search for /.*typo3['/].*/ throughout the whole master branch lists >450 occurrences in >200 files.
One reason for this is, that XCLASSing uses hardcoded paths here.
Don't get me wrong, I really appreciate this, but I think it's more or less a new feature of making the BE "movable".
Marcus, I agree with you. The problem is deeper than I thought before. I will write to the core list my thoughts about this.
- Target version deleted (
0)
Is it really worth the trouble?? It will be rather difficult to make all the changes in the core and then a lot of extensions will be left broken in this regard.
I wonder what is to gain to have the 'typo3' directory configurable? We're shifting anyway from configuration to convention and this is one of the things that can be made into a convention (just like the content table, the fileadmin directory, etc.). With the man power we have, there are more important things to do IMO.
- Status changed from Needs Feedback to Closed
Closed on request of the submitter after discussion on the core list.
Also available in: Atom
PDF