User tests: Successful: Unsuccessful:
Pull Request for Issue #12862
In joomla, a first level menu item alias should not be the name of a folder.
Also, it should not be component
When creating a new menu item at the ROOT of the Menu and NOT filling the alias field, that one is automatically created (same when the menu item is not at the ROOT, but in this case we do not have the issue).
This is done in the store() method and therefore the forbidden aliases are not yet checked by the check() method.
Moving the checks for forbidden aliases from the check() method to the store() method
Create a new menu item (for example a single article one) at the ROOT of the Menu.
Give it the Title of a folder in the root of the site, for example tmp
.
Do NOT fill the alias field.
The menu item is saved with tmp
as alias.
Do the same, but use component
as title.
The menu item is saved with component
as alias.
Trash and delete these menu items.
Patch and redo. Now you will rightfully get the message:
Save failed with the following error: A first level menu item alias can't be 'tmp' because 'tmp' is a sub-folder of your joomla installation folder.
and similar message when using component
Save failed with the following error: A first level menu item alias can't be 'component'.
and the menu item is not saved.
Editing a ROOT existing menu item and changing its alias to a folder name or component
will still be prevented from save.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
I have tested this item
after applying pathc
Save failed with the following error: A first level menu item alias can't be 'tmp' because 'tmp' is a sub-folder of your joomla installation folder.
message appear
Status | Pending | ⇒ | Ready to Commit |
RTC. Thanks for testing!
Milestone |
Added: |
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-11-15 21:50:43 |
Closed_By | ⇒ | rdeutz |
Followed the instruction and successfully tested the issue. confriming the patch worked fine.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12871.