Unique Alias rule in Joomla 1.6 is a bad idea!

272 views
Skip to first unread message

joomlagate.com

unread,
Mar 10, 2011, 10:07:51 PM3/10/11
to joomla-...@googlegroups.com

I noticed that Joomla 1.6 does not allow duplicate Alias for the same type of content. I think this is a bad idea.

 

First, take articles as example:

 

Since Joomla 1.6 allows multi-language feature, I am going to create several articles about same topic for several different languages. And I also use SEF. The result I expected is:

 

http://www.joomlagate.com/en/what-is-joomla.html

 

http://www.joomlagate.com/cn/what-is-joomla.html

 

http://www.joomlagate.com/tw/what-is-joomla.html

 

Look, I want to use the SAME alias for all those three articles (which has different Title in respective language) , since the language name will be included in the SEF URL, so the final URLs will not be duplicated.

 

But Joomla 1.6 refuse to accept same alias for 3 different articles. So how can I get such a result?

 

Well, maybe you will persuade me to make some small changes in the Alias, such as: what-is-joomla, what-is-joomla-cms, what-is-joomla-for, etc. I can reluctantly agree with this if you insist that Unique Alias rule is right thing.

 

But, now please look at this example:

 

Now I want to install Kunena forum on Joomla 1.6 and also use SEF (in fact Joomla 1.6 enables SEF by default).

 

You know, Kunena v1.6.x will automatically create a menu named “Forum Menu” which contains all those top navigation menu items on each forum page. Among these menu items, the top level is “Forum”, and its alias is “forum”.

 

OK, after installation of Kunena, I need to create a mainmenu item for my forum, otherwise, I can’t see forum at frontend, right?

 

Now, I create a new menu item in the Mainmenu (or Topmenu), with Title “Forum”, and alias “forum”.  Then I tried to save this new item but Joomla 1.6 said: “Another menu item has the same alias in Root”, and refuse to save it!

 

Finally, I changed the alias to “forums” and then I can save this new menu item.

 

Now, I went to the frontend, when I hover my mouse to this new menu item, I saw the URL is:

 

http://localhost/16/index.php/forums

 

Then I clicked it, and the URL in the browser address bar changed to :

 

http://localhost/16/index.php/forum

 

When I click other links on forum pages, each URL use /forum/ not /forums/ .

 

How many duplicate pages we get on forum now? One? No!

 

You will find out that for each URL of forum pages, no matter you use /forum/ or /forums/, the same page will be open.

 

Don’t you think this is very bad?

 

At last, if some or all of you guys in Joomla team love this ‘Unique Alias” rule very much, I will not try to change your mind, but I hope you can add a new option of “allow duplicate alias” in the Joomla 1.6 global configuration for somebody like me.

 

 

Thanks.

Joomlagate

http://www.joomlagate.com/

 

Andrew Eddie

unread,
Mar 10, 2011, 10:56:57 PM3/10/11
to joomla-...@googlegroups.com
Hi Joomlagate.

Your first example I'd consider an oversight and bug. We should
extend the uniqueness to include the language tag so I'd encourage you
to log this on the issue tracker.

The example with Kunena, I think, has more to do with site management.
If I understand correctly I'd either move the Kunena menu items
around, or create alias's to them.

Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.6 developers

> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! CMS Development" group.
> To post to this group, send an email to joomla-...@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-cm...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
>

joomlagate.com

unread,
Mar 10, 2011, 11:04:32 PM3/10/11
to joomla-...@googlegroups.com
Hi, Andrew,

Thanks for your response.

For me, the Kunena issue is more serious. It is not a fault of Kunena
itself, because I can create menu for it in the same way on Joomla 1.5 to
avoid those duplicate URLs. But Joomla 1.6 does not allow me to do that.

I hope you set up a test installation of Joomla 1.6 and then try to install
Kunena v1.6.3 and then create mainmenu item for it, you will understand my
opinions.

Thanks.
Joomlagate
http://www.joomlagate.com/

Andrew Eddie

unread,
Mar 10, 2011, 11:12:30 PM3/10/11
to joomla-...@googlegroups.com
Ok, there is an annoying issue with "menu alias" links.

Try this. For your "mainmenu" link to Kunena, create a new menu item.
Click the select button against the Menu Item Type. Select the "Menu
Item Alias" item.

When the page come back, give that menu item the title you need, and
*then* give it an alias called "forum-alias". This SEF alias will
actually be ignored, but it works around the the uniqueness check.

Thinking out loud, it's probably ok to remove the uniqueness check for
a menu item alias (menu type) because it's actually never used in the
SEF url anyway. This problem may already be on the tracker - I'm not
sure. If not, add a new issue on the 1.6 tracker that explains both
of these problems.

Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.6 developers

joomlagate.com

unread,
Mar 11, 2011, 12:09:15 AM3/11/11
to joomla-...@googlegroups.com
Hi, Andrew,

Your new trick works fine. In fact, if you choose the type as "menu item
alias", then you don't need to input alias now, since there is no "Alias"
field for this type.

I will submit this issue to the tracker, I really hope the uniqueness check
will be removed for alias, at least, give me an option to disable it.

Andrew Eddie

unread,
Mar 11, 2011, 12:12:13 AM3/11/11
to joomla-...@googlegroups.com
Sounds like a plan :)

Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.6 developers

JM Simonet

unread,
Mar 11, 2011, 3:10:16 AM3/11/11
to joomla-...@googlegroups.com
This has been already solved in 1.6.1 for Alias menu items
See
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=24881

and was committed a similar behavior for URL menu items in current trunk.
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=24430

In both cases, the alias is unique as it is a date.

JM


--
>Please keep the Subject wording in your answers
This e-mail and any attachments may be confidential. You must not
disclose or use the information contained in this e-mail if you are
not the
intended recipient. If you have received this e-mail in error, please
notify us immediately and delete the e-mail and all copies.
-----------------------------------------------------------
Jean-Marie Simonet / infograf768
Joomla Leadership Team - Production Working group
Joomla! Translation Coordination Team

Matias Griese

unread,
Mar 11, 2011, 3:25:20 AM3/11/11
to Joomla! CMS Development
Hi Joomlagate,

There should be no issues with menu aliases if you are using Joomla
1.6.1 (and Kunena 1.6.4), which uses a time stamp as menu item alias /
alias (wow, someone should really rename "Menu item alias" into
something else as it has 2 meanings).

I must disagree with allowing non-unique menu items for a single
language as it causes a lot of troubles for our users.

People have reported huge amount of issues including missing menus,
wrong template/modules, redirect loops and so on. In most cases the
reason for those issues has been two menu items using the same alias.
This basically throws Joomla 1.5 into undefined state where anything
could happen. In 50% of the cases it just breaks Kunena -- and in the
another 50% it breaks Kunena after making a small change into menus.

In Joomla 1.5 there was one exception: menu item alias, which didn't
use the "alias" field. In Joomla 1.6.0 this logic got broken, because
of users could use already taken name. Joomla 1.6.1 fixed this by
removing the alias field and by using a time stamp internally.

On 11 Mar, 06:04, "joomlagate.com" <joomlag...@gmail.com> wrote:
> Hi, Andrew,
>
> Thanks for your response.
>
> For me, the Kunena issue is more serious. It is not a fault of Kunena
> itself, because I can create menu for it in the same way on Joomla 1.5 to
> avoid those duplicate URLs. But Joomla 1.6 does not allow me to do that.
>
> I hope you set up a test installation of Joomla 1.6 and then try to install
> Kunena v1.6.3 and then create mainmenu item for it, you will understand my
> opinions.
>
> Thanks.
> Joomlagatehttp://www.joomlagate.com/
>
> -----Original Message-----
> From: joomla-...@googlegroups.com
>
> [mailto:joomla-...@googlegroups.com] On Behalf Of Andrew Eddie
> Sent: Friday, March 11, 2011 11:57 AM
> To: joomla-...@googlegroups.com
> Subject: Re: Unique Alias rule in Joomla 1.6 is a bad idea!
>
> Hi Joomlagate.
>
> Your first example I'd consider an oversight and bug.  We should extend the
> uniqueness to include the language tag so I'd encourage you to log this on
> the issue tracker.
>
> The example with Kunena, I think, has more to do with site management.
>  If I understand correctly I'd either move the Kunena menu items around, or
> create alias's to them.
>
> Regards,
> Andrew Eddiehttp://learn.theartofjoomla.com- training videos for Joomla 1.6 developers

JM Simonet

unread,
Mar 11, 2011, 3:32:18 AM3/11/11
to joomla-...@googlegroups.com
>Your first example I'd consider an oversight and bug. We should
>extend the uniqueness to include the language tag so I'd encourage you
>to log this on the issue tracker.

This is not an easy one to solve.
Get the tag is possible, but if we extend it in
libraries/joomla/database/table/menu.php and languagefilter is not
ever published, we will have conflicting aliases in monolanguage.
I forecast other issues when items are tagged to All.

JM

Reply all
Reply to author
Forward
0 new messages