[
https://issues.apache.org/jira/browse/SHINDIG-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276741#comment-13276741
]
[email protected] commented on SHINDIG-1777:
--------------------------------------------------------
bq. On 2012-05-15 12:28:16, Stanton Sievers wrote:
bq. > 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?
bq.
bq. Erin Noe-Payne wrote:
bq. 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.
bq.
bq.
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
bq.
bq. Stanton Sievers wrote:
bq. 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?
bq.
bq. Erin Noe-Payne wrote:
bq. 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?
bq.
bq. Stanton Sievers wrote:
bq. In what container are you rendering this gadget? Can you post your
test gadget as well?
bq.
bq. Erin Noe-Payne wrote:
bq. 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:
bq. <Require feature="open-views"/>
bq. <Require feature="pubsub-2"/>
bq.
bq. Define two views, one default and one called "popup"
bq. Then, in the code bind the following to a button click:
bq. var viewParams = {"name":"somevalue"};
bq. var opt_params = {"view":"popup", "viewTarget":"dialog",
"viewParams":viewParams};
bq. gadgets.views.openGadget(function(){}, function(){},
opt_params);
bq.
bq. Stanton Sievers wrote:
bq. 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()
bq.
bq.
//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
bq.
bq. I'm not familiar with OAHub, but it looks like it is tacking on the
second fragment bit.
bq.
bq. Erin Noe-Payne wrote:
bq. 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?
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.
- Stanton
-----------------------------------------------------------
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:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/5113/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2012-05-15 19:14:23)
bq.
bq.
bq. Review request for shindig.
bq.
bq.
bq. Summary
bq. -------
bq.
bq.
bq. 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.
bq.
bq. Switched to global replace to avoid the issue.
bq.
bq.
bq. This addresses bug SHINDIG-1777.
bq. https://issues.apache.org/jira/browse/SHINDIG-1777
bq.
bq.
bq. Diffs
bq. -----
bq.
bq.
trunk/extras/src/main/javascript/features-extras/org.openajax.hub-2.0.5/iframe.js
1338216
bq.
bq. Diff: https://reviews.apache.org/r/5113/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq. Chrome, FF 12, IE 8/9
bq.
bq.
bq. Thanks,
bq.
bq. Erin
bq.
bq.
> OpenViews / pubsub-2 conflict
> -----------------------------
>
> Key: SHINDIG-1777
> URL: https://issues.apache.org/jira/browse/SHINDIG-1777
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Affects Versions: 2.5.0-beta1
> Reporter: Erin Noe-Payne
> Priority: Minor
> Labels: openviews, pubsub, rpctoken
> Fix For: 2.5.0-beta1
>
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> To reproduce:
> 1) Create a gadget that requires both open-views and pubsub-2 features.
> 2) Make a call to gadgets.views.openGadget(), passing a viewParams object
> 3) In the newly opened gadget, make a call to gadgets.views.getParams(). You
> will receive an empty object, regardless of what was passed as a parameter.
> What's happening?
> 1) It looks like pubsub-2 appends an rpc token to the open gadget url in the
> form of #rpctoken=nzZsoU
> 2) The resulting url param for views looks like this - view-params:
> "{"value":"yarrrgh","retVal":""}#rpctoken=nzZsoU"
> 2) In the views feature, views.js, line 120: The param goes through
> json.parse, which fails and returns an empty object
> This will probably affect more than just the openviews feature.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira