> On 2012-05-15 12:28:16, Stanton Sievers wrote: > > I'm not seeing how the existing code is causing the issue. Do you have a > > sample input url to parseUrlParams that causes the issue? > > Erin Noe-Payne wrote: > See an example url below. There are two hash tags in this url, the first > being right after &mid=0. The original code will catch only one instance. > > > http://localhost:8080/gadgets/ifr?url=http%3A%2F%2Flocalhost%3A8080%2Fdemogadgets%2Fopen_views_demo.xml&container=default&view=popup&lang=%25lang%25&country=%25country%25&debug=1&nocache=1&sanitize=%25sanitize%25&v=d3083135601a3923d70da1a99b86fc65&st=default%3A-qZ05EIwCF5iJg0uia2gDYagSbzknSSqLsOGSZIDr6w3oVfg6ZHNQ0zD384lF5jO9tsyCsVocN9u9awbccSMC1onXMJv4BHgVIRIvLYGk0w5RWoJWhkskuW-0FlrMtXra3PTNNjjOfXnlUoQjX4Co6S1iC3B1fAleDlxVhiMokUsk_J7&testmode=0&parent=http%3A%2F%2Flocalhost%3A8080&mid=0#&view-params=%7B%22value%22%3A%22yarrrgh%22%2C%22retVal%22%3A%22%22%7D#rpctoken=jRo0mz&oahParent=http%3A%2F%2Flocalhost%3A8080 > > Stanton Sievers wrote: > That URL is not valid. There can't be two "#" in a URL. It's also weird > that the first "#" is followed by "&view-params", almost like the view params > are simple being string concatenated. That's the real issue here. Where are > you rendering this gadget? > > Erin Noe-Payne wrote: > Stanton, that's a good point. Not sure exactly what you mean by "where" > am I rendering it. The gadget is being rendered via a call to > gadgets.views.openGadget - does that answer yuor question? > > Stanton Sievers wrote: > In what container are you rendering this gadget? Can you post your test > gadget as well? > > Erin Noe-Payne wrote: > The container is Apache Rave. I'm having trouble connecting to jira to > attach the demo gadget - I will do so when I can. The gist of it is > requiring these two features: > <Require feature="open-views"/> > <Require feature="pubsub-2"/> > > Define two views, one default and one called "popup" > Then, in the code bind the following to a button click: > var viewParams = {"name":"somevalue"}; > var opt_params = {"view":"popup", "viewTarget":"dialog", > "viewParams":viewParams}; > gadgets.views.openGadget(function(){}, function(){}, opt_params); > > Stanton Sievers wrote: > I can reproduce the issue in Shindig's sample common container page. > However, the issue seems to be with OAHub and not with Shindig. The url > looks good when Shindig is done with it, i.e., at the end of > gadget_holder#getIframeUrl() > > > //localhost:8080/gadgets/ifr?url=http%3A%2F%2Flocalhost%3A8080%2Fcontainer%2Fsample-open-gadget.xml&container=default&view=popup&lang=en&country=US&debug=1&nocache=1&sanitize=%25sanitize%25&v=95a97135e24a52cad458ce6e6a22ec55&st=john.doe%3Ajohn.doe%3Ahttp%253A%252F%252Flocalhost%253A8080%252Fcontainer%252Fsample-open-gadget.xml%3Acont%3Ahttp%253A%252F%252Flocalhost%253A8080%252Fcontainer%252Fsample-open-gadget.xml%3A0%3Adefault%3A1337099847&testmode=0&parent=http%3A%2F%2Flocalhost%3A8080&mid=0#view-params=%7B%22name%22%3A%22somevalue%22%7D&rpctoken=1175362355 > > I'm not familiar with OAHub, but it looks like it is tacking on the > second fragment bit. > > Erin Noe-Payne wrote: > Stanton, I see you are correct - thank you for the help. I have the > openajax feature code and see where a correction needs to be made. Can I make > this change and update the diff, or is this feature owned by a different > project? > > Stanton Sievers wrote: > Excellent question. I'm not sure how we manage changes to the > org.openajax.hub code in Shindig's features-extras. Hoping one of the other > committers can give some guidance on this... > > Forgot to publish this review yesterday. > > Ryan Baxter wrote: > I would guess the src originally came from the OpenAjax project on > Sourceforge [1]. However I am not sure if it was modified at all before > being placed in Shindig. > > [1] http://sourceforge.net/projects/openajaxallianc/files/OpenAjaxHub/ > > Matt Franklin wrote: > I diffed the Shindig implementation against the original source a while > ago and we did add the gadgets onload handler call to it. Given that Erin's > change is very shindig specific, I would recommend applying it to the code in > the Shindig feature and dropping a README in noting the differences between > the original source & Shindigs impl. This way we know what to do when we go > update the source.
Matt this seems OK. Do you have any need to update the source in the 2.5 timeframe? - Ryan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/5113/#review7889 ----------------------------------------------------------- On 2012-05-15 19:14:23, Erin Noe-Payne wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/5113/ > ----------------------------------------------------------- > > (Updated 2012-05-15 19:14:23) > > > Review request for shindig. > > > Summary > ------- > > > pubsub-2 appends an rpc token with a hashtag to the open gadget url. When > the url parameters are split by '&', hash tags are skipped and json.parse > fails on the resulting parameter. > > Switched to global replace to avoid the issue. > > > This addresses bug SHINDIG-1777. > https://issues.apache.org/jira/browse/SHINDIG-1777 > > > Diffs > ----- > > > trunk/extras/src/main/javascript/features-extras/org.openajax.hub-2.0.5/iframe.js > 1338216 > > Diff: https://reviews.apache.org/r/5113/diff > > > Testing > ------- > > Chrome, FF 12, IE 8/9 > > > Thanks, > > Erin > >
