When you delete a menu item from the menu the item gets the published tag '-2' instead of being removed from the database, not sure if this is desired functionality or not, however upon creating a new menu item any 'alias' of a deleted item is still taken creating 'Menu Alias already exists' errors. Since there is no direct way to see deleted menu items this can cause issues on large websites.
Suggestion for fix:
Either delete the menuitem from the database.
Add a 'deleted' field to the menu table and check for that field when doing alias collision detection - seems most appropriate to me.
Modify alias collision to check for '-2' and if so disregard the alias - I'm not a fan of as publishing and deleting are two entirely different things.
Labels |
Added:
?
|
Labels |
Added:
?
|
Category | ⇒ | Administration Language & Strings UI/UX |
Status | New | ⇒ | Confirmed |
@zero-24 As a suggestion wouldn't a better fix be to change one of the aliases at the restore point? That seems more intuitive to me. Not to mention is how most other systems work, i.e, Windows and to a certain extent Linux. (Plus, maybe the trash can should be easier to locate. Just saying I've been using Joomla for the last two years and actively develop on the platform - I didn't even know there was a trash can until you said.)
As a suggestion wouldn't a better fix be to change one of the aliases at the restore point? That seems more intuitive to me
And what should we do if we restore from trash?
If i understand your suggestion correct we should do somthing like:
test
some_other_alias
test
--> OKNot quite, more:
That seems like a much better flow to me and more intuitive from a users perspective. (Also sorry if this is badly formatted I'm not used to GitHub.)
@Corofides sounds good feel free to commit code. If you need help by creating a PR see: https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests
https://docs.joomla.org/Git_for_Coders
Thanks!
Please do not forget that, in multilingual, we may have the same aliases when the items are tagged to a different content language.
@Corofides I like your suggestion. Can you provide a PR (Pull Request) for it?
@Kubik-Rubik I should be able to get something pull-able done by tomorrow.
@infograf768 Don't worry. I haven't forgot and the support for that won't be touched.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-05-08 22:35:04 |
Closed_By | ⇒ | zero-24 |
I couldn't create a decent pull due to not understanding how to update the database on a preexisting install but I feel like #6863 kind of misses the point. It'd be like Windows telling you you can't create a new file called 'Untitled' because there happens to be one in the recycle bin. (It makes no sense.)
I couldn't create a decent pull due to not understanding how to update the database on a preexisting install
you need to change the filenames to e.g. 3.4.2-2015-05-10.sql So it should work. Btw. If you try to work with e.g. com_patchtester you need to "Fix" the Database see: Extension Manager: Database
It'd be like Windows telling you you can't create a new file called 'Untitled' because there happens to be one in the recycle bin. (It makes no sense.)
No. In windows you can't change the internal name (was the alias here is) You can create two (or more) articles with the same title (like 'Untitled'
is) but the first will have untitled
as alias. The seccond will have untitled-2
etc. So we have a unique identifier foreach itm.
@Corofides this is expeced behavior (state
-2
) So you can restore a entry (same for e.g. com_content etc.)This is also a ACL thing. So you can trash a article but not delete them from the database.
maybe @brianteeman can sugsest a good english additon to the current message:
current (com_content):
Save failed with the following error: Another article from this category has the same alias
new (com_content):
Save failed with the following error: Another article from this category has the same alias. Please check also the trash.
current (com_menus)
Save failed with the following error: Another menu item with the same parent has this alias
new (com_menus)
Save failed with the following error: Another menu item with the same parent has this alias. Please check also the trash.
This needs also updated on all other managers that use a alias
Or should we open a ticket at https://github.com/joomla/user-interface-text/issues @brianteeman ?