? Success

User tests: Successful: Unsuccessful:

avatar Corofides
Corofides
19 Jan 2015

Joomla now checks for only non-trashed menu items when creating a new menu item and checking for alias collisions. Also overrides the publish function to make sure not to publish if an already published item exists with the same alias.

Issues.

  • Doesn't return error message in list view when the trashed item isn't untrashed.
  • Really need to modify the table class so it can run the query instead of using the query operator.
avatar Corofides Corofides - open - 19 Jan 2015
avatar jissues-bot jissues-bot - change - 19 Jan 2015
Labels Added: ?
avatar brianteeman
brianteeman - comment - 19 Jan 2015

If this is done what happens if I un-trash a menu item that uses the same
alias as a new menu item. Dont we end up with two menu items with the same
alias?

On 19 January 2015 at 11:57, Corofides notifications@github.com wrote:

Joomla now checks for only non-trashed menu items when creating a new menu
item and checking for alias collisions. Also overrides the publish function
to make sure not to publish if an already published item exists with the
same alias.

Issues.

  • Doesn't return error message in list view when the trashed item isn't untrashed.
  • Really need to modify the table class so it can run the query instead of using the query operator.

You can view, comment on, or merge this pull request online at:

#5825
Commit Summary

  • Expanded unique-alias check so that it only checks amongst non-binned menu items, also removed the unique key contraint on #__menu table as it seemed pointless. For now only works on MySql will expand to others later
  • Overload publish to check that no other item is published with same alias, and changed database pull type so I could include nots equal operands
  • Added comment to overloaded publish function
  • Added comment to say that we are checking for conflicting aliases.

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#5825.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar Corofides
Corofides - comment - 19 Jan 2015

No. When you attempt to untrash an a menu item that uses the same alias as a new menu item you get a conflicting alias error and it doesn't allow the untrashing. (As discussed in the issue #5753 (comment) )

avatar brianteeman
brianteeman - comment - 19 Jan 2015

After applying the patch and trying to create a menu item with the same alias as a trashed one I got the following error messge

1062 Duplicate entry '0-1-test-*' for key 'idx_client_id_parent_id_alias_language' SQL=INSERT INTOnqwzk_menu(parent_id,level,lft,rgt,alias,id,menutype,title,note,link,type,published,component_id,browserNav,access,template_style_id,params,home,language) VALUES ('1','1','279','280','test','0','top','test','','index.php?option=com_content&view=article&id=65','component','1','22','0','1','0','{\"show_title\":\"\",\"link_titles\":\"\",\"show_intro\":\"\",\"info_block_position\":\"\",\"show_category\":\"\",\"link_category\":\"\",\"show_parent_category\":\"\",\"link_parent_category\":\"\",\"show_author\":\"\",\"link_author\":\"\",\"show_create_date\":\"\",\"show_modify_date\":\"\",\"show_publish_date\":\"\",\"show_item_navigation\":\"\",\"show_vote\":\"\",\"show_icons\":\"\",\"show_print_icon\":\"\",\"show_email_icon\":\"\",\"show_hits\":\"\",\"show_tags\":\"\",\"show_noauth\":\"\",\"urls_position\":\"\",\"menu-anchor_title\":\"\",\"menu-anchor_css\":\"\",\"menu_image\":\"\",\"menu_text\":1,\"page_title\":\"\",\"show_page_heading\":\"\",\"page_heading\":\"\",\"pageclass_sfx\":\"\",\"menu-meta_description\":\"\",\"menu-meta_keywords\":\"\",\"robots\":\"\",\"secure\":0}','0','*')


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

avatar brianteeman brianteeman - test_item - 19 Jan 2015 - Tested unsuccessfully
avatar Corofides
Corofides - comment - 19 Jan 2015

It'll be the unique key on the database rearing its head. I got rid of
it on the install but it must persist on updates. I'll look into it.

On 2015-01-19 12:38, Brian Teeman wrote:

After applying the patch and trying to create a menu item with the
same alias as a trashed one I got the following error messge

1062 Duplicate entry '0-1-test-*' for key
'idx_client_id_parent_id_alias_language' SQL=INSERT
INTOnqwzk_menu(parent_id,level,lft,rgt,alias,id,menutype,title,note,link,type,published,component_id,browserNav,access,template_style_id,params,home,language)
VALUES
('1','1','279','280','test','0','top','test','','index.php?option=com_content&view=article&id=65','component','1','22','0','1','0','{"show_title":"","link_titles":"","show_intro":"","info_block_position":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item

_navigation":"","show_vote":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","show_tags":"","show_noauth":"","urls_position":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}','0','*')

This comment was created with the J!Tracker Application [1] at
issues.joomla.org/joomla-cms/5825 [2].

Reply to this email directly or view it on GitHub [3].

*

Links:

[1] https://github.com/joomla/jissues
[2] http://issues.joomla.org/tracker/joomla-cms/5825
[3]
#5825 (comment)

Website: smoothlines.net
Twitter: SmoothLines_hp
Facebook: smoothlineshp

Phone: 07878426329

avatar brianteeman
brianteeman - comment - 19 Jan 2015

Dont forget you will also need to update postgresql and ms sql


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

avatar zero-24 zero-24 - change - 19 Jan 2015
Category Administration UI/UX
avatar oorzaak
oorzaak - comment - 10 Apr 2015

Tested; the error is still there. I must have misunderstood the reports of the commits of Jan 20th, 2015.


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

avatar oorzaak oorzaak - test_item - 10 Apr 2015 - Tested unsuccessfully
avatar brianteeman brianteeman - change - 12 Nov 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-11-12 14:36:44
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 12 Nov 2015

I am closing this as it appears to have been resolved elsewhere


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

avatar brianteeman brianteeman - close - 12 Nov 2015

Add a Comment

Login with GitHub to post a comment