#240 — LinguaPlone generates bad URLs when using skin traversers

by Wichert Akkerman last modified Jul 29, 2010 03:49 PM
State Resolved
Version: 3.x
Area Functionality
Issue type Bug
Severity Medium
Submitted by Wichert Akkerman
Submitted on Mar 07, 2010
Responsible Hanno Schlichting
Target release: 4.x
When using a virtual hosting configuration:

ProxyPass / http://localhost:7002/[…]/

The LinguaPlone language selector generates URLs like this: http://develop.cornae.com/++skin++cornae?set_language=en . And when you click that link the language selector generates http://develop.cornae.com/[…]/++skin++cornae?set_language=en as link. I'm sure you can see that something is not quite right there :)

This is using Plone 4.0a5 and LinguaPlone 3.1a1.
Added by Wichert Akkerman on Mar 07, 2010 09:53 PM
Disabling the content negotiator does not seem to have any influence on this.
Added by Hanno Schlichting on Jun 11, 2010 03:03 PM
Issue state: UnconfirmedConfirmed
Wichert and me had a couple private mail exchanges about this. To fix this we need to rewrite some part of the language selector code -> it shouldn't need to inspect any part of the URL, once it sees any virtual hosting marker in it.
Added by Hanno Schlichting on Jul 29, 2010 01:58 PM
Responsible manager: (UNASSIGNED)hannosch
Target release: None4.x
From a email conversation with Wichert:

Wichert said:
Even for <customer site> I don't see a need to ever look at anything before VirtualHostRoot. Can you think of a reason breaking out of the loop when encountering VirtualHostRoot won't work? It does seem to solve things for me at least.

Hanno said:
I looked at the code in more detail again and refactored the horrible languages method into some saner methods. The new _findpath has the logic in question and should be unit testable now.

And I think you are right, as soon as we hit any of the VHM markers, we should just break out of the loop and give up. This should also solve one other issue in the LP tracker
(http://plone.org/products/linguaplone/issues/228) that uses VirtualHostBase.
Added by Hanno Schlichting on Jul 29, 2010 03:49 PM
Issue state: ConfirmedResolved
This is fixed in SVN now. Will make it into LP 4.0a1.

No responses can be added.