Try to create a Menu-Item Alias menu item.
We have a hidden menu and would like to add a 'menu-alias' to a menu item from our main menu.
A new 'menu-item alias' menu item should be created as we have done in the past and as we already have on our site.
In trying this, we get a duplicate error message from Joomla. Although this item is not in the same menu nor are we trying to duplicate the structure.
We also tried by manually adding the date&time to the alias field, but this then returns a 404 when we try to browse to that page.
Joomla 3.6.5
Amazon EC2 Server
NGINX
Tested on a number of sites running 3.6.x and we all seem to experience this issue.
@tonypartridge - this is the exact error we see in Joomla:
Error
Save failed with the following error: The alias kidsgids is already being used by KIDSGIDS menu item in the Main Menu menu (remember it may be a trashed item).
Already checked. Nothing in Trash.
We used this all the time on multiple sites... However we are now having issues which we did not have prior to 3.6.5
It seems to be only when we create a Root item in a different menu. When I try to create it as a sub-menu item, under a Root item as parent then it is fine.
If you try to use the same alias at the root level of multiple menu items, then yes, you'll get the error message you're seeing. The alias rules are essentially this:
foo
so long as they don't share the same direct parent, so menu/foo
and menu/foo/foo
are both valid paths and both of those items can have the foo
alias since one's at the second level and one's at the third)It sounds like what you're trying to do is create the "real" menu item in a hidden menu and display an alias to it in another menu. The aliased doesn't have to have a good item alias for this to work; just let the system generate a random or default value for this and you'll be fine. In Joomla, a menu item that's a "menu item alias" will use the alias for the "real" menu item for URL generation.
Question is now: why when I select 'menu-item alias' menu item type... And select the menu item for which this is an alias... Why does it not save it with a Joomla created alias in the alias field.
Andrew Gous
On 14 Feb 2017, at 14:52, Michael Babker notifications@github.com wrote:
If you try to use the same alias at the root level of multiple menu items, then yes, you'll get the error message you're seeing. The alias rules are essentially this:
The full path must be unique
An alias must be unique at any sub-level of a menu (you can have multiple items with an alias of foo so long as they don't share the same direct parent, so menu/foo and menu/foo/foo are both valid paths and both of those items can have the foo alias since one's at the second level and one's at the third)
All root aliases must be unique and cannot be the same name as a folder in the physical filesystem
It sounds like what you're trying to do is create the "real" menu item in a hidden menu and display an alias to it in another menu. The aliased doesn't have to have a good item alias for this to work; just let the system generate a random or default value for this and you'll be fine. In Joomla, a menu item that's a "menu item alias" will use the alias for the "real" menu item for URL generation.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Since J!3.6.0 the behavior has changed: See https://github.com/GHSVS-de/plg_content_menudatealiasghsvs
@imnlimited as @bertmert pointed out the behaviour has changed in terms of the above. I believe it causes a mess in terms of a menu structure when creating menu items without setting your own alias. You need to define a correct alias. So for example, say you are trying to create an Alias of a menu item say 'item' you need to set the alias to say 'item-alias-1'. This makes sure it is unique. I just tested on latest staging and it works as expected.
@tonypartridge - Thanks for that, but that is not helping with our current situation.
As per Michael's (@mbabker) reply. I am sure ours is supposed to function as we have it but it is not.
I do understand that we should have uniques aliases, that is not the issue. Our issue relates specifically to the Joomla menu item type 'menu-item alias' in Joomla's menu manager.
Menu Item Alias Create an alias to another menu item.
We are trying to create a new menu item which should be an alias of one of the existing menu items from our Main Menu.
See we want to create some pages with the correct url and breadcrumb structure, however we do not want to include these into our main menu.
e.g:
Existing Main Menu Item is 'Directory'
URL: site.com/directory/....
Breadcrumbs: Home > Directory
We would like to add a city page, not to be included in Main Menu. e.g:
New Hidden Menu: Directory -> City
URL: site.com/directory/city/....
Breadcrumbs: Home > Directory > City >
etc...
We have existing menu items which was created previously using the exact same Joomal 'Menu-Item Alias' menu item type and working perfectly.
We only started experiencing this issue recently... Post J3.6.
@bertmert - I tried the plugin, no success either. It does not want to work on our site.
Since J!3.6.0 the behavior has changed: See https://github.com/GHSVS-de/plg_content_menudatealiasghsvs
Hello,
Can you provide exact steps to recreate? I just created a menu item alias of a sub menu item without issue by setting the menu item alias to login-alias.
Also, do you know you don't need to get a hidden menu? Set display in menu to No in Menu Item -> Link Type.
@tonypartridge thanks for the info.
Okay, re:
I just created a menu item alias of a sub menu item without issue by setting the menu item alias to login-alias.
manually adding an Alias is not the issue, that works.
Steps are included in my previous post.
Then, re:
Also, do you know you don't need to get a hidden menu? Set display in menu to No in Menu Item -> Link Type.
That is great. Thanks... I can use this but would like to know why I am unable to create a menu-item alias as we did previously.
@imnlimited then the issue has already been explained. The alias is now taken from the menu item title regardless of the menu item type. If a menu item with the same alias exists anywhere it cannot be used and you must type a unique one.
this means you have and are aware of the alias usage throughout your site.
@tonypartridge - Okay, so what is the purpose of the 'Menu-Item Alias' menu Type then? Surely it's purpose has always been to create an alias of an existing menu item?
This now creates a new problem where one would end up potentially having very large complex menus, whereas before one could create multiple menu's to kinda sort and keep some order when you have a very large site. By this I mean that you could create different menus to contain the menu items to different parts in ones site whilst keeping the URL- and breadcrumb structure consistent.
Now it seems that we have to add all these other items inside the main menu, but set the items to 'not show on menu'.
I still can't see what other purpose the 'Menu-Item Alias' Menu Type had than to be an alias of an existing menu....
Thanks all for your input, much appreciated....
Hello,
The menu Item Alias is exactly designed for linking to another menu item. I believe we removed the date input generation because people were not thinking the menu structure and it's creates an SEO nightmare. If you change the menu item type later on most people forget to change the alias and it's then a date format inserted into the URL. Same if you put a menu item a sub of an alias with the date format too.
You JUST need to provide a unique alias for every menu item. That is All, you can carry on doing as you always have just provide a unique alias.
This whole thing is about good standards. It only takes a second extra to type the alias in this scenario.
@tonypartridge - I really don't mind entering a unique alias into the alias field for menu items that is perfect and I completely agree with it. What my issue is, is only when you create a 'Menu-Item Alias' Menu type. This you would usually do when you want to replicate the url path or breadcrumb path by replicating another menu item to add sub-items.
e.g.:
Existing Main Menu Item is 'Directory'
URL: site.com/directory/....
Breadcrumbs: Home > Directory
We would like to add a city page, not to be included in Main Menu. e.g:
New Hidden Menu: Directory -> City
URL: site.com/directory/city/....
Breadcrumbs: Home > Directory > City >
or am I missing something...?
If you created the Menu Item Alias it redirects to the menu item it is an alias off.
If you add a single article menu item under a menu item alias the url takes the menu item alias alias.
Priority | Medium | ⇒ | Very low |
Status | New | ⇒ | Expected Behaviour |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-04-05 10:59:00 |
Closed_By | ⇒ | franz-wohlkoenig |
Priority | Very low | ⇒ | Medium |
Status | Expected Behaviour | ⇒ | Closed |
Closed_Date | 2017-04-05 10:59:00 | ⇒ | 2017-04-05 10:59:01 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/14034
closed as Expected Behaviour. @imnlimited feel free to reopen for further Discussion.
The alias rules are essentially this:
The full path must be unique
An alias must be unique at any sub-level of a menu (you can have multiple items with an alias of foo so long as they don't share the same direct parent, so menu/foo and menu/foo/foo are both valid paths and both of those items can have the foo alias since one's at the second level and one's at the third)
All root aliases must be unique and cannot be the same name as a folder in the physical filesyst
Iam using Joomla 3.7.2 and it wont let me create a submenu item (second level) with an alias that is the same as one of the root item. Is this correct behaviour?
I want to achieve this menu structure
foo
so I get:
site.com/foo
site.com/foo/foo
However, when I'm creating a submenu item /foo/foo I get an error message: The alias foo is already being used by Foo menu item in the Main Menu menu (remember it may be a trashed item).
I dont get it, the full paths are unique, aren't they?
Are you sure you haven't got a trashed item on foo?
On 6 Jun 2017, 09:25 +0100, dc006 notifications@github.com, wrote:
The alias rules are essentially this:
The full path must be unique
An alias must be unique at any sub-level of a menu (you can have multiple items with an alias of foo so long as they don't share the same direct parent, so menu/foo and menu/foo/foo are both valid paths and both of those items can have the foo alias since one's at the second level and one's at the third)
All root aliases must be unique and cannot be the same name as a folder in the physical filesyst
Iam using Joomla 3.7.2 and it wont let me create a submenu item (second level) with an alias that is the same as one of the root item. Is this correct behaviour?
I want to achieve this menu structure
foo• foo
so I get:
site.com/foo
site.com/foo/foo
However, when I'm creating a submenu item /foo/foo I get an error message: The alias foo is already being used by Foo menu item in the Main Menu menu (remember it may be a trashed item).
I dont get it, the full paths are unique, aren't they?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14034.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Yes Iam sure. I've deleted all trashed items, cleaned cache and tested with different aliases. Once the alias is used in root it can not be used on the second level.
well, you have a Menu Item Type of your second level item "Menu Item Alias". Try to change the Menu Item Type.
OK.I've done additional tests and it appears that when the "new" menu item (on the second level with alias that matches root level) is created for the first time it works OK, however when I try to edit the same item (change the title for example) the error " alias is already being used" appears and can not save the menu item.
I just tested that scenario and editing works fine too. Did you clear your browser cache after the Joomla! 3.7 update?
Enable debug and this forces all JS and CSS files to be renewed.
On 6 Jun 2017, 11:41 +0100, dc006 notifications@github.com, wrote:
OK.I've done additional tests and it appears that when the "new" menu item (on the second level with alias that matches root level) is created for the first time it works OK, however when I try to edit the same item (change the title for example) the error " alias is already being used" appears and can not save the menu item.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14034.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
that is odd
I've cleared browser cache, enabled debug, tested different browser, checked database _menu table and reinstall Joomla core files just in case. Still getting the same behaviour.
I can't replicate the issue on my other Joomla site.
Could this be caused by 3rd party extension?
Very likely. But since no one including yourself can replicate but on one of your sites can we close this issue?
On 6 Jun 2017, 12:28 +0100, dc006 notifications@github.com, wrote:
that is odd
I've cleared browser cache, enabled debug, tested different browser, checked database _menu table and reinstall Joomla core files just in case. Still getting the same behaviour.
I can't replicate the issue on my other Joomla site.
Could this be caused by 3rd party extension?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14034.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
sure, thank you for your time. I will debug further.
Please view all menu items and make sure trashed and set to show.