? Success

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
12 Nov 2016

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.

Summary of Changes

Moving the checks for forbidden aliases from the check() method to the store() method

Testing Instructions

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.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
1.00

avatar infograf768 infograf768 - open - 12 Nov 2016
avatar infograf768 infograf768 - change - 12 Nov 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Nov 2016
Category Libraries
avatar mehranfazili
mehranfazili - comment - 13 Nov 2016

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.

avatar infograf768 infograf768 - alter_testresult - 13 Nov 2016 - mehranfazili: Tested successfully
avatar alikon
alikon - comment - 13 Nov 2016

I have tested this item successfully on 67e1bbe

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


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12871.

avatar alikon alikon - test_item - 13 Nov 2016 - Tested successfully
avatar infograf768 infograf768 - change - 13 Nov 2016
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 13 Nov 2016

RTC. Thanks for testing!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12871.

avatar zero-24 zero-24 - change - 13 Nov 2016
Milestone Added:
avatar rdeutz rdeutz - close - 15 Nov 2016
avatar rdeutz rdeutz - merge - 15 Nov 2016
avatar rdeutz rdeutz - reference | b4effb8 - 15 Nov 16
avatar rdeutz rdeutz - merge - 15 Nov 2016
avatar rdeutz rdeutz - close - 15 Nov 2016
avatar rdeutz rdeutz - change - 15 Nov 2016
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

Add a Comment

Login with GitHub to post a comment