[
https://issues.apache.org/jira/browse/SHINDIG-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13275792#comment-13275792
]
[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
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?
- Stanton
-----------------------------------------------------------
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:
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 12:42:36)
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/features/src/main/javascript/features/core.util.urlparams/urlparams.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