cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <>
Subject Re: Wrong restauration of environment context after pass-through
Date Sat, 29 Jan 2005 13:09:29 GMT
Sylvain Wallez wrote:
> Hi all,
> I need help to fix a weird bug [1] that appears when a "cocoon:" URL is 
> used after a sitemap mount with pass-through="true" causes coming back 
> to the parent sitemap.
> In such case, and only when "cocoon:" is used (normal files work fine), 
> the environment context is not restored to its proper value and still 
> points to the mounted sitemap context.
> I commited a testcase for this in 2.1 which you can find at 
> http://localhost:8888/samples/test/pass-through/explain-test.html
> I couldn't find the bug and this is currently a blocker for one of our 
> projects: the pass-through is used a generic portal app where specific 
> projects can do some overriding in pass-through sitemaps.
> Any help is very welcome (Carsten?).
> Sylvain
> [1]
Ok, I just had a look into the problem. The CocoonComponentManager that 
act as the SourceResolver doesn't get the correct value as you outlined 
above. Now it has something to do with all the wrappers and facades we 
use for the environment.
The only hint I can give is: if you implement the setContext(S,S,S) 
method in the EnvironmentWrapper class and reset the "last context" to 
the current context, the pass-through is working nicely. But 
unfortunately all internal pipeline calls are then not working anymore 
:( So, the solution could be to find a property that can be used as a 
switch for this - I haven't found one.

In general - I know this doesn't help you at all - I think it's 
difficult to implement the pass-through in 2.1.x without changing the 
interfaces. With the step to 2.2 and changing some internal interfaces 
it was easy to do so. That's why I suggested to just make this feature 
for 2.2 - unfortunately the code was never removed from 2.1.x :(
So, perhaps it's easier for you to use 2.2?

Sorry, but I don't have more time atm.


View raw message