User tests: Successful: Unsuccessful:
Pull Request for Issue #45151
Summary of Changes
This PR fixes the wrong autoload path for fields when the "administrator" folder has been redefined. The current setup assumes the folder is in the default location, and makes sure Joomla will always find the right location for "administrator" folder, no matter where it's placed.
Set up a custom "administrator" folder
Move or rename "administrator " folder in your Joomla installation to simulate custom folder.
Check the issue before applying the fix
Access a page in Joomla admin panel that requires autoload fields. It should fail to load the fields correctly due to the custom folder location.
3.Apply the PR
Merge the PR into Joomla installation
Actual result BEFORE applying this Pull Request
Joomla cannot find the autoload path for the fields, even when the "administrator" folder is relocated or renamed, and the fields will be loaded with errors.
Expected result AFTER applying this Pull Request
Joomla will correctly find the autoload path for the fields, even when the "administrator" folder is relocted or renamed and the fields will be loaded without any errors.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_fields Repository |
Title |
|
Labels |
Added:
PR-5.2-dev
|
Category | Administration com_fields Repository | ⇒ | Administration com_fields com_languages Repository Installation Libraries |
It seems that you have additional changes in this PR which are unrelated to the change you want to do. Can you please fix that?
As stated before this alone will not work
there are lots of places where the code will be broken by changing the name of the admin folder. to the best of my knowledge it has never been supported for the administrator folder to be renamed
You might make fields work but you still will not be able to do many things
If what you are aiming to do is to move joomla out of the public web space then we already provide the means to do that
Thanks for the feedback!
@brianteeman I realize that the administrator
folder isn't fully supported and would require much broader changes. I will try to resolve the issue.
Thanks for the feedback! @brianteeman I realize that the
administrator
folder isn't fully supported and would require much broader changes. I will try to resolve the issue.
Hi @Sanjana2906,
I am by far not an expert in coding but since there have been some concerns raised about whether this solution (and even the issue) is beneficial to be included into Joomla, could you share your perspective on the topic vs trying to fix something that may not be (100%) fixable?
Sometimes, an issue raised is just not a good idea to be developed.
From my (limited) understanding of how everything fits into the Joomla structure, this feels like a fix that will create many more problems than it solves - especially considering the very limited security benefit brought by being able to rename the /administrator path... due to the concerns raised, I'd imagine there is a (pretty good) chance that the maintainers will not include this into the codebase when there are many other issues/PR that you could work on that would be (very) beneficial to the project.
Hi @exlemor
Thank you for sharing your thoughts.
I now understand that changing the administrator folder path isn't officially supported and could lead to broader issues across the system. My intent with this PR was to address a very specific edge case related to autoload path for fields when such a redefinition is attempted , rather than to support renaming the entire administrator directory as a general feature.
I agree that if the overall benefit is limited and the risk of breaking areas is high, it may not be suitable for inclusion. I'm happy to pause this effort and shift my focus to other open issues that would be more impactful for the project.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-04-11 01:25:20 |
Closed_By | ⇒ | exlemor |
@Sanjana2906 Please change the title from
"Fix for issue #45151 -"
to
"[5.2]"
Titles are used in the changelog. Havin the issue number in the title isn't needed as the number is shown in the comment.