? ? Pending
Referenced as Related to: # 16276

User tests: Successful: Unsuccessful:

avatar marrouchi
marrouchi
27 Jan 2017

The link field of an alias menu item displays "index.php?Item=" without the actual item id.
menus edit item stagging administration

Summary of Changes

I've added the menu item id to the link value in the MenusModelItem::getItem method.

Testing Instructions

Create a menu alias and stay in the menu item edit form.

  • Before the PR
    After save, you should see "index.php?Itemid=" in the link value readonly field.
  • After the PR
    After save, you should see "index.php?Itemid=XXX" in the link field with XXX being the actual menu item id.

Documentation Changes Required

No documentation changes required

avatar marrouchi marrouchi - open - 27 Jan 2017
avatar marrouchi marrouchi - change - 27 Jan 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jan 2017
Category Administration com_menus
avatar marrouchi marrouchi - change - 27 Jan 2017
The description was changed
avatar marrouchi marrouchi - edited - 27 Jan 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Jan 2017

I have tested this item successfully on 64184cc


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 27 Jan 2017 - Tested successfully
avatar marrouchi marrouchi - change - 27 Jan 2017
Labels Added: ?
avatar marrouchi marrouchi - change - 27 Jan 2017
Title
Backend menu item edit form : Add Itemid to the alias link value
[Improvement] Backend menu item edit form : Add Itemid to the alias link value
avatar marrouchi marrouchi - edited - 27 Jan 2017
avatar marrouchi
marrouchi - comment - 27 Jan 2017

@csthomas Could you test please ?

avatar csthomas
csthomas - comment - 27 Jan 2017

I have tested this item successfully on 8316dd9


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

avatar csthomas csthomas - test_item - 27 Jan 2017 - Tested successfully
avatar marrouchi
marrouchi - comment - 27 Jan 2017

RTC please.

avatar jeckodevelopment
jeckodevelopment - comment - 27 Jan 2017

@marrouchi it needs another test.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Jan 2017

I have tested this item successfully on 8316dd9


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 27 Jan 2017 - Tested successfully
avatar jeckodevelopment jeckodevelopment - change - 27 Jan 2017
Status Pending Ready to Commit
avatar jeckodevelopment
jeckodevelopment - comment - 27 Jan 2017

RTC


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

avatar rdeutz
rdeutz - comment - 27 Jan 2017

Why did you made the PR, the link isn't used IIRC?

avatar marrouchi
marrouchi - comment - 28 Jan 2017

@rdeutz I notice this when i've tested the PR #11343 and it seemed to me like a glitch. I find that is more "cleaner" to display the actual Itemid then to display "index.php?Itemid=" in each alias edit form. Sure it's not used anywhere in the code source for now, but it can be helpful for the administrator to know that an alias does not point on any component and it's just simply represented by an Itemid (just like any other menu item link value is shown).

avatar rdeutz
rdeutz - comment - 28 Jan 2017

ok it doesn't hurt so I am going to merge it

avatar rdeutz rdeutz - change - 28 Jan 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-01-28 10:42:00
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 28 Jan 2017
avatar rdeutz rdeutz - merge - 28 Jan 2017
avatar infograf768
infograf768 - comment - 27 Feb 2017

@rdeutz @marrouchi
Except that each save adds the Itemid number in the field.
Look at:
#14264

avatar izharaazmi
izharaazmi - comment - 27 Feb 2017

Why do we need an Id value appended anyway? Menu module handles the item alias itself, I think.

avatar infograf768
infograf768 - comment - 27 Feb 2017

yes, it uses the params aliasoptions to create the link.

avatar infograf768
infograf768 - comment - 27 Feb 2017

I suggest to revert this as it just confuses the user.

avatar izharaazmi
izharaazmi - comment - 27 Feb 2017

Right. However we should re-verify frontend menu afterwards.

avatar infograf768
infograf768 - comment - 27 Feb 2017

I did. No issues after revert as this link field value is just not used at all.

in mod_menu helper

						case 'alias':
							$item->flink = 'index.php?Itemid=' . $item->params->get('aliasoptions');
							break;

in /libraries/cms/pathway/site.php

						case 'alias':
							// If this is an alias use the item id stored in the parameters to make the link.
							$url = 'index.php?Itemid=' . $link->params->get('aliasoptions');
							break;

etc.

avatar izharaazmi
izharaazmi - comment - 27 Feb 2017

Great ?

avatar marrouchi
marrouchi - comment - 27 Feb 2017

Oups, i'm sorry for this. I'll revert right away !

Add a Comment

Login with GitHub to post a comment