> 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?
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);
- Erin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5113/#review7889
-----------------------------------------------------------
On 2012-05-15 12:42:36, Erin Noe-Payne wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5113/
> -----------------------------------------------------------
>
> (Updated 2012-05-15 12:42:36)
>
>
> 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/features/src/main/javascript/features/core.util.urlparams/urlparams.js
> 1338216
>
> Diff: https://reviews.apache.org/r/5113/diff
>
>
> Testing
> -------
>
> Chrome, FF 12, IE 8/9
>
>
> Thanks,
>
> Erin
>
>