No Code Attached Yet
avatar toivo
toivo
16 May 2022

Steps to reproduce the issue

Edit a menu item for example in the Main Menu.
Click 'Save as Copy' in the drop-down list of 'Save & Close'

Expected result

A copy of the menu item is saved, similar to Joomla 3.10.9.

Actual result

Error message "Save failed with the following error: The alias my-menu-item is already being used by My Menu Item menu item in the Main Menu menu (remember it may be a trashed item)".

System information (as much as possible)

Joomla 4.1.4-dev of 16 May using PHP 8.0.15.

Additional comments

Reported in the Joomla! Forum topic https://forum.joomla.org/viewtopic.php?f=808&t=993777

Votes

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

avatar toivo toivo - open - 16 May 2022
avatar toivo toivo - change - 16 May 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 16 May 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 16 May 2022
avatar zero-24
zero-24 - comment - 16 May 2022

Confirmed its an regression of this PR: #37395 cc @bembelimen

To me it looks like the original PR fixed the issue with the wrong approach. As described in the PR in the case of save as copy an ID value of "0" will be set and therefor will have an ID set within the data but its "empty" (== 0) and in that case we need the id from the item above.

Before said change we ignored any unsaved changes within com_menus as discribed in the original PR as it was intended to be a 1:1 copy of the existing Item. But we dont do that anymore within com_content there we only update the title and alias in case they already exist an coresponding PR for com_menus will follow

avatar zero-24 zero-24 - change - 16 May 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-05-16 23:27:37
Closed_By zero-24
avatar zero-24 zero-24 - close - 16 May 2022
avatar zero-24
zero-24 - comment - 16 May 2022

Please test this PR: #37813 (comment) @toivo & forum Thanks!

Add a Comment

Login with GitHub to post a comment