Carsten Ziegeler wrote:
Sylvain Wallez wrote:
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.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] http://issues.apache.org/bugzilla/show_bug.cgi?id=33178
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.
I don't understand what is this "last context": does it have to behave like a stack, or is it the context in which the internal pipeline has been built?
Also, what's the relation between a mount and subsequent internal pipelines. Each internal pipeline uses its own EnvironmentWrapper? So that would mean that the original HttpEnvironment has been modified?
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?
Unfortunately, this is not possible. Running this project with 2.1.7-dev is acceptable, but not 2.2-dev.
Sorry, but I don't have more time atm.
No problem. Thanks for the time you already spent.
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }