On Fri, May 25, 2012 at 1:47 PM, Noe-Payne, Erin A. <[email protected]>wrote:

> Chris, when you say switch to the canvas view you mean maximizing the
> widget, correct?
>
> I am seeing pretty different behavior from what you describe. My
> environment is a fresh checkout of the Rave trunk, with the shindig pubsub2
> patch applied via an overlay.
>
> -Using your test widget, if I add it from the widget store then navigate
> back to rave, min / maxing the gadget will always show the home view, never
> switch to canvas view. Looking at the network requests I do not see an rpc
> token attached, and the qs parameters show view:home every time.  Once I
> reload the page once, the gadget works as expect when I min/max. This
> behavior, by the way, is present regardless of the shindig pubsub2 patch.
>

I was referring to "Maximize" but I just tested and the same thing happend
in "min/restore".

-If I uncomment the pubsub2 feature, then min/maxing the gadget no longer
> makes new requests. It never switches views, and OpenAjax.hub.ManagedHub
> actually throws a javascript error - "Uncaught Error:
> OpenAjax.hub.Error.Duplicate".
>

That is actually expected if you just applied the patch directory to
shindig-beta1 because there was an additional patch that has already been
applied to shindig trunk to fix that issue (by Matt) [1].  That is one of
the reasons I was running against shindig trunk. It could very well be
something in shindig trunk that is causing it but I was running that
because that's where it will eventually be applied and other issues were
already fixed.

Chris

[1] https://issues.apache.org/jira/browse/SHINDIG-1776

>
> >-----Original Message-----
> >From: Chris Geer [mailto:[email protected]]
> >Sent: Friday, May 25, 2012 1:12 PM
> >To: [email protected]
> >Subject: Re: PubSub & RPC Token
> >
> >Here is a gadget that reproduces the problem on my machine.
> >
> ><?xml version="1.0" encoding="UTF-8" ?>
> ><Module>
> >    <ModulePrefs title="Multiple Content Sections (version 1)"
> height="300">
> >       <!-- <Require feature="pubsub-2" />-->
> >        <UserPref name="selectedTab" datatype="hidden"/>
> >    </ModulePrefs>
> >    <Content type="html" view="home">
> >        <![CDATA[
> >            <h1>Home</h1>
> >        ]]>
> >    </Content>
> >    <Content type="html" view="canvas">
> >        <![CDATA[
> >            <h1>Canvas</h1>
> >        ]]>
> >    </Content>
> ></Module>
> >
> >Also, here is a patch file to allow the upgrade to latest shindig (
> >http://pastebin.com/i1qeUsKn).
> >
> >Chris
> >
> >On Fri, May 25, 2012 at 10:01 AM, Noe-Payne, Erin A.
> ><[email protected]>wrote:
> >
> >> Ok that's the correct path. I'll see if I can reproduce
> >>
> >> >-----Original Message-----
> >> >From: Chris Geer [mailto:[email protected]]
> >> >Sent: Friday, May 25, 2012 12:59 PM
> >> >To: [email protected]
> >> >Subject: Re: PubSub & RPC Token
> >> >
> >> >The rpcToken thing might be a red herring as you said. This was the
> patch
> >> I
> >> >applied
> >> >
> >> >ndex:
> >>
> >> >extras/src/main/javascript/features-extras/org.openajax.hub-
> >2.0.5/iframe.js
> >>
> >>==========================================================
> >=
> >> >========
> >> >---
> >>
> >> >extras/src/main/javascript/features-extras/org.openajax.hub-
> >2.0.5/iframe.js
> >> >(revision
> >> >1340294)
> >> >+++
> >>
> >> >extras/src/main/javascript/features-extras/org.openajax.hub-
> >2.0.5/iframe.js
> >> >(working
> >> >copy)
> >> >@@ -398,8 +398,12 @@
> >> >         } else {
> >> >           iframe.onload =
> >> >function(){window[params.IframeContainer.onGadgetLoad]();};
> >> >         }
> >> >-        iframe.src = params.IframeContainer.uri +
> >> >-                "#rpctoken=" + securityToken + tunnelText + idText;
> >> >+
> >> >+        var uri = params.IframeContainer.uri;
> >> >+        var hashIdx = uri.indexOf('#');
> >> >+        var joinToken = (hashIdx === -1)?'#':'&';
> >> >+
> >> >+        iframe.src = uri + joinToken + "rpctoken=" + securityToken +
> >> >tunnelText + idText;
> >> >     }
> >> >
> >> >     // If the relay iframe used by RPC has not been loaded yet, then
> we
> >> >won't have unload protection
> >> >
> >> >On Fri, May 25, 2012 at 9:54 AM, Noe-Payne, Erin A.
> >> ><[email protected]>wrote:
> >> >
> >> >> Chris,
> >> >>
> >> >> I would think it's not surprising that the rpc token is present?
> Gadgets
> >> >> use rpc for more than just pubsub, but I'm not sure about that. I'll
> >> take a
> >> >> look on my local build.
> >> >>
> >> >> Also, which iteration of the shindig patch do you have? The most
> recent
> >> >> version applies to the openajax.hub feature, rather than to the url
> >> params
> >> >> feature, so make sure you are on that.
> >> >>
> >> >> Erin
> >> >>
> >> >> >-----Original Message-----
> >> >> >From: Chris Geer [mailto:[email protected]]
> >> >> >Sent: Friday, May 25, 2012 12:38 PM
> >> >> >To: dev
> >> >> >Subject: PubSub & RPC Token
> >> >> >
> >> >> >I ran into an odd issue today regarding pubsub-2 again. In my
> modules
> >> >> where
> >> >> >I'm using pubsub-2, everything is working great. The problems comes
> in
> >> my
> >> >> >modules that aren't using pubsub-2, they will no longer load in
> canvas,
> >> >> and
> >> >> >won't reload when coming back to home view. After doing a little
> >> digging I
> >> >> >saw there was a failed network connection (using Chrome's developer
> >> >tools)
> >> >> >when the gadget tried to load in canvas mode. It was the Ifr
> request to
> >> >> >/gadgets to load the gadget.xml file. What seemed odd was in looking
> >at
> >> >> the
> >> >> >request url it included a #rpcToken element even though that gadget
> >> >didn't
> >> >> >declare pubsub-2 in it's requirements. As soon as I added in the
> >> pubsub-2
> >> >> >feature it all worked great. The gadget doesn't use pubsub-2
> anywhere
> >> in
> >> >> >it's definition or js. This happened on two gadgets and adding in
> the
> >> >> >feature solved it on both so it wasn't isolated to a single gadget.
> >> >> >
> >> >> >BTW - I am currently running Rave .12-SNAPSHOT against Shindig
> >> >> >2.5.0-SNAPSHOT with Erin's pubsub-2 patch. I realize this puts me in
> >> >> >"unknown" territory a bit but I thought I'd ask anyway. Any
> thoughts?
> >> >> >
> >> >> >Chris
> >> >>
> >>
>

Reply via email to