You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2004/12/17 15:30:18 UTC
FYI: weird javascript "function not found" problems with 2.1.5
I've had a weird case where javascript functions were found without
problem, and "lost" after a logout/login of the user, as if the
flowscript-calling sitemap had suddently lost track of them.
I'm documenting this here in case it rings bells for someone. I've seen
this in a 2.1.5.1 app, didn't test it with 2.1.6 as the app in question
needs some changes for 2.1.6.
Scenario:
1.-User logs in, CForms-based editor form works
2. User logs out in another browser window, logs in again (login page
uses sendPageAndWait but no CForms)
3. User tries to reload CForms-based editor form (via URL, *not*
continuation), and gets a "javascript: function x_y_z() not found",
where x_y_z is the function called by the sitemap for this editor page,
which worked in 1.
Flowscript functions for the CForms-based editor page are called from
the top-level application sitemap, other functions (login, logout) are
called from subsitemaps. I noticed that the problem occurs right after
the login page calls a continuation, via a matcher in the top-level
application sitemap.
Moving the continuation matcher from the top-level sitemap down to the
same sitemap which generates the login page seems to fix the problem.
Let me know if someone needs more detail, I haven identified the
problem very precisely but it looks like a weird context thing.
-Bertrand
Re: FYI: weird javascript "function not found" problems with 2.1.5
Posted by Reinhard Poetz <re...@apache.org>.
Bertrand Delacretaz wrote:
> I've had a weird case where javascript functions were found without
> problem, and "lost" after a logout/login of the user, as if the
> flowscript-calling sitemap had suddently lost track of them.
>
> I'm documenting this here in case it rings bells for someone. I've seen
> this in a 2.1.5.1 app, didn't test it with 2.1.6 as the app in question
> needs some changes for 2.1.6.
>
> Scenario:
> 1.-User logs in, CForms-based editor form works
>
> 2. User logs out in another browser window, logs in again (login page
> uses sendPageAndWait but no CForms)
>
> 3. User tries to reload CForms-based editor form (via URL, *not*
> continuation), and gets a "javascript: function x_y_z() not found",
> where x_y_z is the function called by the sitemap for this editor page,
> which worked in 1.
>
> Flowscript functions for the CForms-based editor page are called from
> the top-level application sitemap, other functions (login, logout) are
> called from subsitemaps. I noticed that the problem occurs right after
> the login page calls a continuation, via a matcher in the top-level
> application sitemap.
>
> Moving the continuation matcher from the top-level sitemap down to the
> same sitemap which generates the login page seems to fix the problem.
>
> Let me know if someone needs more detail, I haven identified the problem
> very precisely but it looks like a weird context thing.
>
> -Bertrand
try using rhino_1.6 from trunk - should be binary compatible
--
Reinhard