? Success

User tests: Successful: Unsuccessful:

avatar RCheesley
RCheesley
25 Oct 2014

Steps to reproduce the issue

Create a menu structure as below:
Menu item 1 (featured article) with alias of 12345

  • Menu item 2 (article) with alias of menu-item-1

Enable SEF URL's using htaccess to rewrite.

Check the structure of the main menu item and the menu item beneath - Menu item 2 will have a SEF path of /12345/menu-item-1.

Now change Menu item 1 to be an external URL with the link field containing #, as an example. The path should remain the same (don't change the alias field).

An SEO person tells you that 12345 isn't a great alias to use in your menu structure, and suggests that it be changed (and of course that the URLs redirected!), but when you try to edit the menu item (which is now an external URL) there is no alias field present to be edited.

Expected result

It would be expected that, as this field is being used in SEF URL generation, that it could be edited. I think perhaps the logic was that if you're using an external URL then you wouldn't need an alias, but when it's used in a menu system, it needs to be configurable - especially as historically many folk used an external URL pointing at # to be a top-level non-clickable item.

Actual result

The alias field is not visible, and can't be edited unless you change the item type, edit the alias, then change it back.

System information (as much as possible)

Joomla 3

Additional comments

While it's not generally a sensible thing to do changing aliases of menu items due to the fact that it impacts on all URLs beneath, and I appreciate the logic that most folk using an external URL won't need to have an alias, there are occasions where this needs to be edited. Often these will have randomly generated aliases which need to be optimised and it's a real pain to have to change the item type just to edit the alias.

avatar RCheesley RCheesley - open - 25 Oct 2014
avatar jissues-bot jissues-bot - change - 25 Oct 2014
Labels Added: ?
avatar infograf768
infograf768 - comment - 26 Oct 2014

I suggest to do something similar to the alias menu item:
1. Create a new string. Something like:
COM_MENUS_TIP_ALIAS_URL_LABEL="<strong>Notice</strong><br />You can let the alias field empty if you do not need to set the URL to #."

  1. add a field in item.xml
<field name="aliastipurl"
type="spacer"
label="COM_MENUS_TIP_ALIAS_URL_LABEL"/>
  1. add a conditional in com_menu edit.php
if ($this->item->type == 'url')
{
    echo $this->form->getControlGroup('aliastipurl');
}

same for hathor override

<?php if ($this->item->type = 'url') : ?>
    <li> <?php echo $this->form->getLabel('aliastipurl'); ?></li>
<?php endif; ?>
avatar infograf768
infograf768 - comment - 29 Oct 2014

??

avatar brianteeman brianteeman - change - 30 Oct 2014
Category SEF
avatar RCheesley
RCheesley - comment - 16 Nov 2014

It would be helpful to know where I might find item.xml, I can't find it in my Joomla 3 install.

avatar infograf768
infograf768 - comment - 17 Nov 2014

/administrator/components/com_menus/models/forms/item.xml

is the one

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

avatar brianteeman
brianteeman - comment - 27 Nov 2014

@RCheesley Have you been able to update the PR with @infograf768 suggestion?

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

avatar Hackwar
Hackwar - comment - 8 Dec 2014

Why would you need something like that? You can already simply leave it empty... In general, works great for me.

avatar Hackwar Hackwar - test_item - 8 Dec 2014 - Tested successfully
avatar anibalsanchez
anibalsanchez - comment - 15 Jan 2015

@test OK

With the patch, External Link has an alias to be edited.


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

avatar anibalsanchez anibalsanchez - test_item - 15 Jan 2015 - Tested successfully
avatar zero-24 zero-24 - change - 15 Jan 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 15 Jan 2015

RTC Thanks to all here!


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

avatar brianteeman brianteeman - change - 16 Jan 2015
Labels Added: ?
avatar roland-d
roland-d - comment - 17 Jan 2015

@RCheesley Are you going to add in @infograf768 suggestion?

avatar Hackwar
Hackwar - comment - 17 Jan 2015

Please don't. Sorry, but why should we confuse our users more with yet another special treatment for something? I'd say to keep it simple.

avatar roland-d roland-d - close - 19 Jan 2015
avatar roland-d roland-d - change - 19 Jan 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-01-19 21:49:21

Add a Comment

Login with GitHub to post a comment