Joomla 2.5 multi-language SEF issue with utf8 menu aliases causing infinite loop and

2,067 views
Skip to first unread message

nant

unread,
Oct 18, 2012, 6:00:54 PM10/18/12
to joomla-...@googlegroups.com
Ok, it is difficult to explain but I have contacted Jonathan Neubauer and javier gomez (both having worked on multi-language Joomla 2.5 sites) and they have both experienced similar issues.

The scenario:

Joomla 2.5.7 multi-language sites (2 languages for me English and Greek).
Pure Joomla multi-language handling (no Joomfish) with no menu associations between languages (yet).
Menus have utf8 aliases (configured also the Joomla global configuration for this).
Joomla SEF enabled (with and without htaccess rewrites has been tested).

With SEF on I visit a frontpage article as superadmin.
The article URL looks like:
http://localhost:8888/dxnew/index.php/el/γραφειο-τυπου/δελτια-τυπου/90-δελτιο-10-10-2012-δξ-ελλαδα-δε-χρειαζεται-μονο-καλα-λογια

When I click on the edit icon I get the editor opening just fine in frontend and my URL is now:
http://localhost:8888/dxnew/index.php/el/γραφειο-τυπου/δελτια-τυπου?view=form&layout=edit&a_id=90&return=aHR0cDovL2xvY2FsaG9zdDo4ODg4L2R4bmV3L2luZGV4LnBocC9lbC/Os8BzrHPhs61zrnOvy3PhMFz4DOv8FL860zrXOu8EzrnOsS3PhMFz4DOv8FLzkwLc60zrXOu8EzrnOvy0xMC0xMC0yMDEyLc60zr4tzrXOu867zrHOtM6xLc60zrUtz4fPgc61zrnOsc62zrXPhM6xzrktzrzOv869zr8tzrrOsc67zrEtzrvOv86zzrnOsQ=

(doesn't look ok to me but who knows).

When I click on the Cancel button or the Save button I get a browser message (tested with Safari and FF on a mac):

Safari can't open the page
Too many redirects trying to open the page
http://localhost:8888/dxnew/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/%CE%B3%C0s%ACs%E1%B3%ADs%AEs%AF%CBs%E10%5C%F8%0C%EB%FC%14%BF:%D3:%D7:%EF%04%CE%B9%CE%B1-%CF%84%C1s%E03%AF%F0R%F3%93%02%DC%EBL%EB%5C%EB%BC%13:%E7:%FC%B4%C4%C0%B4%C4%C0%B4%C8%C0%C4%C8%B7:%D3:%F8%B7:%D7:%EF:%EF:%C7:%D3:%C4%B7:%D3:%D4%B7%3E%1F%3E%07:%D7:%E7:%C7:%DB:%D7%3E%13:%C7:%E4%B7:%F3:%FF:%F7:%FC%B7:%EB:%C7:%EF:%C4%B7:%EF:%FF:%CF:%E7:%C4
This might occur if you open a page that is redirected to open a page that is redirected to open the original page.

Without SEF the previous 3 URLs look like:

http://localhost:8888/dxnew/index.php?option=com_content&view=article&id=90:δελτιο-10-10-2012-δξ-ελλαδα-δε-χρειαζεται-μονο-καλα-λογια&catid=12&Itemid=228&lang=el

http://localhost:8888/dxnew/index.php?option=com_content&view=form&layout=edit&a_id=90&Itemid=228&return=aHR0cDovL2xvY2FsaG9zdDo4ODg4L2R4bmV3L2luZGV4LnBocD9vcHRpb249Y29tX2NvbnRlbnQmdmlldz1hcnRpY2xlJmlkPTkwOs60zrXOu8EzrnOvy0xMC0xMC0yMDEyLc60zr4tzrXOu867zrHOtM6xLc60zrUtz4fPgc61zrnOsc62zrXPhM6xzrktzrzOv869zr8tzrrOsc67zrEtzrvOv86zzrnOsSZjYXRpZD0xMiZJdGVtaWQ9MjI4Jmxhbmc9ZWw==&lang=el

http://localhost:8888/dxnew/index.php?option=com_content&view=article&id=90:%CE%B4%CE%B5%CE%BB%C13%AEs%AF%CBLL%0BLL%0BL%8C%0CL%8Bs%AD3%AF%8Bs%ADs%AE%F3%AE%F3%ACs%AD3%ACKs%AD3%ADKs%E1%F3%E0s%ADs%AEs%ACs%AD%B3%ADs%E13%ACs%AEKs%AF3%AF%F3%AFs%AF%CBs%AE%B3%ACs%AE%F3%ACKs%AE%F3%AF%F3%AC%F3%AEs%ACI%98%D8]%1AY%0FLL%89%92]%19[ZY%0FL%8C%8E%09%9B%18[%99%CFY[&lang=el

I have also noticed that if I change the menu alias of the menu that the article is viewed in from

δελτιο-τυπου

to

δελτιο-τυπου-1 (just added the -1),

then SEF scenario works ok.

I really don't know how to debug this so I am posting here for similar issues perhaps others have encountered.

JM Simonet

unread,
Oct 19, 2012, 8:07:23 AM10/19/12
to joomla-...@googlegroups.com
I can't reproduce the issue here on 2.5.7 as well as master.
(FF on Macintosh)
Tested with Tamil to make sure.

Regards

JM

Ok, it is difficult to explain but I have contacted Jonathan Neubauer and javier gomez (both having worked on multi-language Joomla 2.5 sites) and they have both experienced similar issues.

The scenario:

Joomla 2.5.7 multi-language sites (2 languages for me English and Greek).
Pure Joomla multi-language handling (no Joomfish) with no menu associations between languages (yet).
Menus have utf8 aliases (configured also the Joomla global configuration for this).
Joomla SEF enabled (with and without htaccess rewrites has been tested).

With SEF on I visit a frontpage article as superadmin.
The article URL looks like:
http://localhost:8888/dxnew/index.php/el/ɡɦɸÉ"ɈɫÉÕ-É-É"¼ÉÕÉ"/ɬɈɊÉ-ɫɸ-É-É"¼ÉÕÉ"/90-ɬɈɊÉ-É«ÉÕ-10-10-2012-ɬÉÃ-ÉˆÉŠÉŠÉøÉ¬Éø-ɬɈ-É'É¦ÉˆÉ«ÉøÉŸÉˆÉ-ÉøÉ«-É ÉÕÉÀÉÕ-É»ÉøÉŠÉø-ÉŠÉÕɡɫɸ


When I click on the edit icon I get the editor opening just fine in frontend and my URL is now:
http://localhost:8888/dxnew/index.php/el/ɡɦɸÉ"ɈɫÉÕ-É-É"¼ÉÕÉ"/ɬɈɊÉ-ɫɸ-É-É"¼ÉÕÉ"?view=form&layout=edit&a_id=90&return=aHR0cDovL2xvY2FsaG9zdDo4ODg4L2R4bmV3L2luZGV4LnBocC9lbC/Os8BzrHPhs61zrnOvy3PhMFz4DOv8FL860zrXOu8EzrnOsS3PhMFz4DOv8FLzkwLc60zrXOu8EzrnOvy0xMC0xMC0yMDEyLc60zr4tzrXOu867zrHOtM6xLc60zrUtz4fPgc61zrnOsc62zrXPhM6xzrktzrzOv869zr8tzrrOsc67zrEtzrvOv86zzrnOsQ=


(doesn't look ok to me but who knows).

When I click on the Cancel button or the Save button I get a browser message (tested with Safari and FF on a mac):

Safari can't open the page
Too many redirects trying to open the page
http://localhost:8888/dxnew/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/index.php/el/%CE%B3%C0s%ACs%E1%B3%ADs%AEs%AF%CBs%E10%5C%F8%0C%EB%FC%14%BF:%D3:%D7:%EF%04%CE%B9%CE%B1-%CF%84%C1s%E03%AF%F0R%F3%93%02%DC%EBL%EB%5C%EB%BC%13:%E7:%FC%B4%C4%C0%B4%C4%C0%B4%C8%C0%C4%C8%B7:%D3:%F8%B7:%D7:%EF:%EF:%C7:%D3:%C4%B7:%D3:%D4%B7%3E%1F%3E%07:%D7:%E7:%C7:%DB:%D7%3E%13:%C7:%E4%B7:%F3:%FF:%F7:%FC%B7:%EB:%C7:%EF:%C4%B7:%EF:%FF:%CF:%E7:%C4
This might occur if you open a page that is redirected to open a page that is redirected to open the original page.

Without SEF the previous 3 URLs look like:

http://localhost:8888/dxnew/index.php?option=com_content&view=article&id=90:ɬɈɊÉ-É«ÉÕ-10-10-2012-ɬÉÃ-ÉˆÉŠÉŠÉøÉ¬Éø-ɬɈ-É'É¦ÉˆÉ«ÉøÉŸÉˆÉ-ÉøÉ«-É ÉÕÉÀÉÕ-É»ÉøÉŠÉø-ÉŠÉÕɡɫɸ&catid=12&Itemid=228&lang=el


http://localhost:8888/dxnew/index.php?option=com_content&view=form&layout=edit&a_id=90&Itemid=228&return=aHR0cDovL2xvY2FsaG9zdDo4ODg4L2R4bmV3L2luZGV4LnBocD9vcHRpb249Y29tX2NvbnRlbnQmdmlldz1hcnRpY2xlJmlkPTkwOs60zrXOu8EzrnOvy0xMC0xMC0yMDEyLc60zr4tzrXOu867zrHOtM6xLc60zrUtz4fPgc61zrnOsc62zrXPhM6xzrktzrzOv869zr8tzrrOsc67zrEtzrvOv86zzrnOsSZjYXRpZD0xMiZJdGVtaWQ9MjI4Jmxhbmc9ZWw==&lang=el

http://localhost:8888/dxnew/index.php?option=com_content&view=article&id=90:%CE%B4%CE%B5%CE%BB%C13%AEs%AF%CBLL%0BLL%0BL%8C%0CL%8Bs%AD3%AF%8Bs%ADs%AE%F3%AE%F3%ACs%AD3%ACKs%AD3%ADKs%E1%F3%E0s%ADs%AEs%ACs%AD%B3%ADs%E13%ACs%AEKs%AF3%AF%F3%AFs%AF%CBs%AE%B3%ACs%AE%F3%ACKs%AE%F3%AF%F3%AC%F3%AEs%ACI%98%D8]%1AY%0FLL%89%92]%19[ZY%0FL%8C%8E%09%9B%18[%99%CFY[&lang=el

I have also noticed that if I change the menu alias of the menu that the article is viewed in from

ɬɈɊÉ-É«ÉÕ-É-É"¼ÉÕÉ"

to

ɬɈɊÉ-É«ÉÕ-É-É"¼ÉÕÉ"-1 (just added the -1),


then SEF scenario works ok.

I really don't know how to debug this so I am posting here for similar issues perhaps others have encountered.
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-cms/-/eEFVFm_HiEgJ.
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.


-- 
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 Production Working group
Joomla! Translation Coordination Team 

nant

unread,
Oct 19, 2012, 12:03:44 PM10/19/12
to joomla-...@googlegroups.com
Actually its difficult to reproduce - will try and work out some exact steps to reproduce on a clean J257 environment.

I do have a local site that has this issue - if anyone is willing to take a look at it I can akeeba backup it ans send it over as I would really like to figure out what is happening.

nant

unread,
Oct 22, 2012, 12:52:00 PM10/22/12
to joomla-...@googlegroups.com
Ok - reproduced on a clean Joomla 2.5.7 environment - with no added extensions - so its either a bug or a very bad configuration on my part.

Here are the steps to reproduce:

0. Clean (no content) Joomla 2.5.7 install
1. Install Greek language pack
2. Create a new Greek content language (Extensions -> Language Manager -> Content tab) with Title = Greek, Native title = Ελληνικά, Language tag = el-GR, URL Language Code = el, Image Prefix = el
3. Enable System - Language Code plugin with el-GR and en-GB in parms area
4. Enable System - Language Filter plugin with Language selection for new Visitors = Browser Settings, Automatic Language Change = Yes, Menu associations = No, Remove URL Language Code = No, Add alternative meta tags = No
5. Global Configuration -> Site area set Search Engine Friendly URLs = Yes, Use URL rewriting = No, Adds Suffix to URL = No, Unicode Aliases = Yes
6. Create new Main Menu (EN) for English language with new Main menu (EN) module pointing to it and published for English language in position-7
7. Create new Home (EN) menu item in the Main Menu (EN) menu and make it default so it gets the english flag
8. Create new Main Menu (GR) for Greek language with new Main menu (GR) module pointing to it and published for Greek language in position-7 and make the module show all submenus.
9. Create new Home (GR) menu item in the Main Menu (GR) menu and make it default so it gets the greek flag
10. Create new Uncategorised article with title: Ποιοι είμαστε and alias ποιοι-ειμαστε and make it public for Greek language (and content will do)
11. Create a new featured article menu item in the Main Menu (GR). Make it a parent item (same level as the Home(GR) default menu item) - Name this menu item = ΤΟ ΚΙΝΗΜΑ with alias = κινημα and of course mark it for Greek langauge.
12. Create a new single article menu item pointing to our Greek article (see step 10) with title = Ποιο είμαστε alias = ποιο-ειμαστε and of course make it Greek language
13. Create a language switcher module for position-7 and publish for all languages (default settings here)

Now login on frontend as superadmin, click on the greek flag, click on the Ποιοι είμαστε menu item under the ΤΟ ΚΙΝΗΜΑ menu to get to the single article we created in step 12.

Now click on the edit icon (since you are superadmin you will see it) and then try to save or cancel (the Greek button names are Αποθήκευση / Ακύρωση).

Your browser should show the too many redirects problem.

I have packaged this up using akeeba, so you can easily see for yourself.
The admin user has password = password

I hope someone can help to debug this as I am sure that if it is due to a bug (and not a bad config on my part) it will manifest itself in different ways on other multilanguage sites.

Nick

nant

unread,
Oct 22, 2012, 12:57:45 PM10/22/12
to joomla-...@googlegroups.com
Damn - too large to attach - anyone willing to take a crack at this can contact me on skype - nickanti and I will send him the file.

Nick

nant

unread,
Oct 22, 2012, 12:58:56 PM10/22/12
to joomla-...@googlegroups.com
Please contact me on skype - nickanti and I will send you the akeeba backup file (too big for attachment here)

Nick

nant

unread,
Oct 22, 2012, 3:39:11 PM10/22/12
to joomla-...@googlegroups.com
Thanks to javier gomez ... the package is now on dropbox:

https://dl.dropbox.com/u/1648056/nant/joomla257mulilanguagesefissue.jpa

nant

unread,
Oct 24, 2012, 4:02:53 AM10/24/12
to joomla-...@googlegroups.com
And here it is live for everyone to see:

http://multilanguage.cloudaccess.net/index.php/el/

login with admin/password

then click on the

Ποιοι είμαστε item

click on the icon to edit the article

then save or cancel the article to see the bug!

nant

unread,
Oct 24, 2012, 4:13:31 AM10/24/12
to joomla-...@googlegroups.com

nant

unread,
Nov 7, 2012, 5:51:17 AM11/7/12
to joomla-...@googlegroups.com
Follow-up here - I have been able to solve my problem (see the tracker thread), but the issue is still present in Joomla as it does not produce url-safe strings for certain Greek chars (perhaps other languages also trigger this bug).

The solution needs to be implements deeper in the Joomla code - I have not been able to trigger the interest of Joomla core devs in order to push for a clean solution....

Help is always welcomed and accepted ...

Nick

elin

unread,
Nov 7, 2012, 6:21:52 PM11/7/12
to joomla-...@googlegroups.com
Hi Nick,

There are no core developers there is just a community of people who use Joomla and want to help it get better, which presumably includes you. If you are interested in solving this issue then you should solve it and send a pull request.

Elin

nant

unread,
Nov 8, 2012, 10:00:24 AM11/8/12
to joomla-...@googlegroups.com
Hi again Elin,

I would not have spent so many hours documenting, preparing a test site to prove I am not an elephant,  personally contacting at least 3 Joomla multi-language site builders I know in order to confirm with them the issue.

As I mentioned on the tracker thread and in this thread also, the issue is imo much more involved than just the single case I identified. This has been confirmed also on the tracker as an issue actually that was present in Joomla 1.5 and looks like its also present in Joomla 2.5/3.0.

Simply put (as Dennis Hermatski put it)

base64_decode a bit incorrectly works with utf8, it can create none url-safe
string with characters / and +

Dennis suggested as a work-around to simply further protect things feeding this faulty function by

urlencode(in) and urldecode(ing)

strings before and after passing through the function.

This solves my personal issue, but - once again - in my opinion it is not the way to go.
The developer that coded the base64_XXXXX functions (or someone else much more knowledgeable than I), needs to
step up and get involved.

Not wishing to further debate if I am "interested and want to help" - I am interested, you will just have to take my word for this.

So, if someone can help me raise this issue somehow (let me know which dev actually coded the function
or someone that could be commissioned to look deeper into the real cause, then I will personally spend more time
(and even spend real money) to sponsor a proper resolution.

If I cannot achieve a solution using this approach, then I am open to anything anyone has to propose.

Thanks for reading and listening.

Nick

P.S. Elin, please do not take any of the above as an insult or personal attack as it is not my intention.

elin

unread,
Nov 8, 2012, 12:20:20 PM11/8/12
to joomla-...@googlegroups.com
No offense taken ... and that's why github has that great blame feature that lets you track down who wrote the code and ask them what they were thinking about. If it has been present since 1.5 then that might take a bit of digging but we need to understand why it has become an issue at this moment.

Elin

shumisha

unread,
Nov 9, 2012, 7:33:24 AM11/9/12
to joomla-...@googlegroups.com
Hi

I'm sure you guys realized by now that base64_* are php native functions, and that they indeed don't appear to be UTF-8 safe (see comments on http://php.net/base64_encode).
I have not looked into it really, but if url encoding fixes it, that looks just as good as anything else.
Side note: 1.5 didn't allow for UTF-8 urls, all non latin chars were replaced prior to any use, so that situation would never have occured at that time.

Rgds


Le jeudi 8 novembre 2012 18:20:20 UTC+1, elin a écrit :

nant

unread,
Nov 11, 2012, 4:48:49 AM11/11/12
to joomla-...@googlegroups.com
Thanks for stepping in -

ok, based on this I have submitted a pull request on the tracker ticket (if I have done it right ofc) - please take a look and lets push the process (let me know please if I can help push).
Reply all
Reply to author
Forward
0 new messages