?
avatar Corofides
Corofides
16 Jan 2015

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.

avatar Corofides Corofides - open - 16 Jan 2015
avatar jissues-bot jissues-bot - change - 16 Jan 2015
Labels Added: ?
avatar jissues-bot jissues-bot - change - 16 Jan 2015
Labels Added: ?
avatar zero-24
zero-24 - comment - 16 Jan 2015

@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 :smile:

Or should we open a ticket at https://github.com/joomla/user-interface-text/issues @brianteeman ?

avatar zero-24 zero-24 - change - 16 Jan 2015
Category Administration Language & Strings UI/UX
avatar zero-24 zero-24 - change - 16 Jan 2015
Status New Confirmed
avatar Corofides
Corofides - comment - 16 Jan 2015

@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.)

avatar zero-24
zero-24 - comment - 16 Jan 2015

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:

  • create article with alias test
  • trash it: Joomla generates a alias like some_other_alias
  • create a new article with the alias test --> OK
  • try to restore the first trashed article
  • you get a error and / or the alias (that is used by SEO) don't match up.
avatar Corofides
Corofides - comment - 16 Jan 2015

Not quite, more:

  • create article with alias 'test'
  • trash it, trashed-article keeps alias 'test'
  • attempt to create new article with alias 'test'
  • Joomla! checks alias field in database, allows creation if 'test' doesn't exist, or, if the 'test' that exists is in the trash
  • Try to restore the first trashed article
  • Joomla! finds conflict, asks, you to rename the alias from either the restored 'test' or the currently existing 'test' (or just generates the previous error about alias conflict)

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.)

avatar zero-24
zero-24 - comment - 16 Jan 2015

@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!

avatar infograf768
infograf768 - comment - 17 Jan 2015

Please do not forget that, in multilingual, we may have the same aliases when the items are tagged to a different content language.

avatar Kubik-Rubik
Kubik-Rubik - comment - 17 Jan 2015

@Corofides I like your suggestion. Can you provide a PR (Pull Request) for it?

avatar Corofides
Corofides - comment - 17 Jan 2015

@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.

avatar brianteeman
brianteeman - comment - 30 Apr 2015

there is a PR #6863 that been merged to update the strings

avatar zero-24 zero-24 - close - 8 May 2015
avatar zero-24
zero-24 - comment - 8 May 2015

closing as we have a PR here #5825 and a merged PR here #6863

avatar zero-24 zero-24 - change - 8 May 2015
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2015-05-08 22:35:04
Closed_By zero-24
avatar zero-24 zero-24 - close - 8 May 2015
avatar Corofides
Corofides - comment - 10 May 2015

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.)

avatar zero-24
zero-24 - comment - 10 May 2015

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.

Add a Comment

Login with GitHub to post a comment