User tests: Successful: Unsuccessful:
User MaxPowerHamburg reported that after renaming his administrator folder (and changing the JPATH_ADMINISTRATOR constant to point to the new directory), he is no longer able to create new menu items.
I'm aware that renaming the administrator folder is not recommended for various reasons, including problems with updating, extensions and paths stored in the database. But I don't see any reason against this change, because it is according to the usage of path constants all over the CMS.
This PR changes two occurrences of JPATH_ROOT . '/administrator'
to JPATH_ADMINISTRATOR
. For normal environments
administrator
folder to something else, e.g. adm
.define('JPATH_ADMINISTRATOR', JPATH_ROOT . DIRECTORY_SEPARATOR . 'administrator');
to
define('JPATH_ADMINISTRATOR', JPATH_ROOT . DIRECTORY_SEPARATOR . 'adm');
Unfortunately, the second change (administrator/components/com_contenthistory/models/history.php) can't really be tested, because the legacy JTableContent will be loaded if the other one can't be found. Maybe this can be merged by a maintainer on review?
None
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_content com_contenthistory com_menus |
@andrepereiradasilva That's right. I fixed the occurrences of JPATH_ROOT . '/administrator'
I could find outside of the update files. The hardcoded reference to "administrator" is used in the update mechanism and in various other locations (e.g. in addfieldpath in XML files).
Everything in PHP files should be able to use constants consistently and anything that isn't is Doing It Wrong™. As has been explained about a bajillion times, there isn't handling to deal with it in non-PHP files.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-12-30 13:45:35 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Merged on review. Thanks!
while this change itself is correct be aware that as it is now there are more places that hardcode
/administrator
.egrep -n -R "\/administrator\/" /path/to/joomla/
(in linux) will show a few of those.