Hello All,
I've been using JanRain's Engage widget along with Jason Huck's XML_tree tag for a few years now. It recently stopped working and I'm trying to figure out why. My code has not changed. I think XML_tree.inc has stopped loading at startup. I'm getting this error when I try to load the page that uses the tag. Error Message: No tag, type or constant was defined under the name string->displayname. at: /mysite.com/_pageToLoad.html on line: 28 at position: 38 Error Code: -9948 Code from page (see line 28 below): [var:'token'=(action_param:'token')] [Include:'_apikey.inc'] <!--apikey from Janrain --> [var:'post_values'=(array(pair('token' = #token), pair('apiKey' = $apikey), pair('extended' = 'true'), pair('format' = 'xml')))] [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', -POSTparams = #post_values)] <!-- xml_tree Lasso Tag is used to extract Name and Email from the returned XML file --> [var:'myxml'=(xml_tree($XML_String))] [var:'displayname'=($myxml->profile->displayname)] <!--*** LINE 28 ***--> [var:'email'=($myxml->profile->email)] ... Any thoughts on how to proceed? Thanks, Mike ############################################################# This message is sent to you because you are subscribed to the mailing list Lasso [hidden email] Official list archives available at http://www.lassotalk.com To unsubscribe, E-mail to: <[hidden email]> Send administrative queries to <[hidden email]> |
xml_tree is loading just fine, otherwise you would have seen an
error on line 26. The issue is most likely an XML object that the parser does not understand, or JanRain changed its API response. I'd start upstream and verify that the XML node you seek actually exists and is in the proper format. --steve On 12/19/17 at 2:13 PM, [hidden email] (Mike Ealy) pronounced: >Hello All, > >I've been using JanRain's Engage widget along with Jason Huck's XML_tree tag >for a few years now. It recently stopped working and I'm trying to figure >out why. My code has not changed. I think XML_tree.inc has stopped loading >at startup. > >I'm getting this error when I try to load the page that uses the tag. > >Error Message: >No tag, type or constant was defined under the name string->displayname. >at: /mysite.com/_pageToLoad.html on line: 28 at position: 38 > >Error Code: -9948 > >Code from page (see line 28 below): > >[var:'token'=(action_param:'token')] >[Include:'_apikey.inc'] <!--apikey from Janrain --> > >[var:'post_values'=(array(pair('token' = #token), pair('apiKey' = $apikey), >pair('extended' = 'true'), pair('format' = 'xml')))] > >[var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >-POSTparams = #post_values)] > ><!-- xml_tree Lasso Tag is used to extract Name and Email >from the returned XML file --> > >[var:'myxml'=(xml_tree($XML_String))] > >[var:'displayname'=($myxml->profile->displayname)] <!--*** LINE 28 ***--> >[var:'email'=($myxml->profile->email)] >... > > >Any thoughts on how to proceed? > >Thanks, >Mike > > > > >############################################################# > >This message is sent to you because you are subscribed to >the mailing list Lasso [hidden email] >Official list archives available at http://www.lassotalk.com >To unsubscribe, E-mail to: <[hidden email]> >Send administrative queries to <[hidden email]> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Steve Piercy Website Builder Eugene, OR <[hidden email]> <http://www.stevepiercy.com/> ############################################################# This message is sent to you because you are subscribed to the mailing list Lasso [hidden email] Official list archives available at http://www.lassotalk.com To unsubscribe, E-mail to: <[hidden email]> Send administrative queries to <[hidden email]> |
Thanks, Steve. When I use the tool at the Janrain site it works. The token
is sent one time to my page resulting in the displayname and email to be populated. However, when I try it from my site, two tokens are received and the XML_String is invalid. Successful result using Janrain's test tool: Parameter Name: token Parameter Value: ac56e4441b3b025ffdc16abcf9c98c0c2f4778f3 XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='ok'><profile><displayName>Joe Smith</displayName><email>[hidden email]</email><googleUserId>1025393187 07480245999</googleUserId> ... <providerName>Google+</providerName><providerSpecifier>googleplus</providerS pecifier> ... </rsp> Result: var:displayname = Joe Smith var:un = [hidden email] Unsuccessful result implemented on my site: Parameter Name: token Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 Parameter Name: provider Parameter Value: googleplus Parameter Name: token Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 Parameter Name: widget_type Parameter Value: auth XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err code='1' msg='Invalid parameter: token'/></rsp> Thanks for your help. Mike > xml_tree is loading just fine, otherwise you would have seen an > error on line 26. > > The issue is most likely an XML object that the parser does not > understand, or JanRain changed its API response. I'd start > upstream and verify that the XML node you seek actually exists > and is in the proper format. > > --steve > > > On 12/19/17 at 2:13 PM, [hidden email] (Mike Ealy) pronounced: > >> Hello All, >> >> I've been using JanRain's Engage widget along with Jason Huck's XML_tree tag >> for a few years now. It recently stopped working and I'm trying to figure >> out why. My code has not changed. I think XML_tree.inc has stopped loading >> at startup. >> >> I'm getting this error when I try to load the page that uses the tag. >> >> Error Message: >> No tag, type or constant was defined under the name string->displayname. >> at: /mysite.com/_pageToLoad.html on line: 28 at position: 38 >> >> Error Code: -9948 >> >> Code from page (see line 28 below): >> >> [var:'token'=(action_param:'token')] >> [Include:'_apikey.inc'] <!--apikey from Janrain --> >> >> [var:'post_values'=(array(pair('token' = #token), pair('apiKey' = $apikey), >> pair('extended' = 'true'), pair('format' = 'xml')))] >> >> [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >> -POSTparams = #post_values)] >> >> <!-- xml_tree Lasso Tag is used to extract Name and Email >> from the returned XML file --> >> >> [var:'myxml'=(xml_tree($XML_String))] >> >> [var:'displayname'=($myxml->profile->displayname)] <!--*** LINE 28 ***--> >> [var:'email'=($myxml->profile->email)] >> ... >> >> >> Any thoughts on how to proceed? >> >> Thanks, >> Mike >> >> >> >> >> ############################################################# >> >> This message is sent to you because you are subscribed to >> the mailing list Lasso [hidden email] >> Official list archives available at http://www.lassotalk.com >> To unsubscribe, E-mail to: <[hidden email]> >> Send administrative queries to <[hidden email]> > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > Steve Piercy Website Builder Eugene, OR > <[hidden email]> <http://www.stevepiercy.com/> > > > ############################################################# > > This message is sent to you because you are subscribed to > the mailing list Lasso [hidden email] > Official list archives available at http://www.lassotalk.com > To unsubscribe, E-mail to: <[hidden email]> > Send administrative queries to <[hidden email]> ############################################################# This message is sent to you because you are subscribed to the mailing list Lasso [hidden email] Official list archives available at http://www.lassotalk.com To unsubscribe, E-mail to: <[hidden email]> Send administrative queries to <[hidden email]> |
This:
XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err code='1' msg='Invalid parameter: token'/></rsp> I assume is the output of $XML_String, correct? If so, that would be the response from the janrain API telling you that you sent an invalid parameter named "token". I would start by double-checking the value of $post_values is what you expect to send to janrain. Test the values in the API tester tool on janrain. Also ensure that you are using the correct API endpoint (i.e., version, URL) in your include_url. If all looks OK, then next inspect the response from the API by outputting $XML_String again, but do so in a textarea to avoid HTML encoding of entities: <textarea>[$XML_String]</textarea> --steve On 12/20/17 at 10:10 AM, [hidden email] (Mike Ealy) pronounced: >Thanks, Steve. When I use the tool at the Janrain site it works. The token >is sent one time to my page resulting in the displayname and email to be >populated. However, when I try it from my site, two tokens are received and >the XML_String is invalid. > > >Successful result using Janrain's test tool: > >Parameter Name: token >Parameter Value: ac56e4441b3b025ffdc16abcf9c98c0c2f4778f3 > >XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp >stat='ok'><profile><displayName>Joe >Smith</displayName><email>[hidden email]</email><googleUserId>1025393187 >07480245999</googleUserId> >... ><providerName>Google+</providerName><providerSpecifier>googleplus</providerS >pecifier> >... ></rsp> > >Result: >var:displayname = Joe Smith >var:un = [hidden email] > > >Unsuccessful result implemented on my site: > >Parameter Name: token >Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 > >Parameter Name: provider >Parameter Value: googleplus > >Parameter Name: token >Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 > >Parameter Name: widget_type >Parameter Value: auth > >XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err >code='1' msg='Invalid parameter: token'/></rsp> > > >Thanks for your help. > >Mike > > >>xml_tree is loading just fine, otherwise you would have seen an >>error on line 26. >> >>The issue is most likely an XML object that the parser does not >>understand, or JanRain changed its API response. I'd start >>upstream and verify that the XML node you seek actually exists >>and is in the proper format. >> >>--steve >> >> >>On 12/19/17 at 2:13 PM, [hidden email] (Mike Ealy) pronounced: >> >>> Hello All, >>> I've been using JanRain's Engage widget along with Jason >>>Huck's XML_tree tag >>> for a few years now. It recently stopped working and I'm trying to figure >>> out why. My code has not changed. I think XML_tree.inc has stopped loading >>> at startup. >>> I'm getting this error when I try to load the page that >>>uses the tag. >>> Error Message: >>> No tag, type or constant was defined under the name string->displayname. >>> at: /mysite.com/_pageToLoad.html on line: 28 at position: 38 >>> Error Code: -9948 >>> Code from page (see line 28 below): >>> [var:'token'=(action_param:'token')] >>> [Include:'_apikey.inc'] <!--apikey from Janrain --> >>> [var:'post_values'=(array(pair('token' = #token), >>>pair('apiKey' = $apikey), >>> pair('extended' = 'true'), pair('format' = 'xml')))] >>> [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >>> -POSTparams = #post_values)] >>> <!-- xml_tree Lasso Tag is used to extract Name and Email >>> from the returned XML file --> >>> [var:'myxml'=(xml_tree($XML_String))] >>> [var:'displayname'=($myxml->profile->displayname)] <!--*** >>>LINE 28 ***--> >>> [var:'email'=($myxml->profile->email)] >>> ... >>> Any thoughts on how to proceed? >>> Thanks, >>> Mike >>> ############################################################# >>> This message is sent to you because you are subscribed to >>> the mailing list Lasso [hidden email] >>> Official list archives available at http://www.lassotalk.com >>> To unsubscribe, E-mail to: <[hidden email]> >>> Send administrative queries to <[hidden email]> >> >>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>Steve Piercy Website Builder Eugene, OR >><[hidden email]> <http://www.stevepiercy.com/> >> >> >>############################################################# >> >>This message is sent to you because you are subscribed to >>the mailing list Lasso [hidden email] >>Official list archives available at http://www.lassotalk.com >>To unsubscribe, E-mail to: <[hidden email]> >>Send administrative queries to <[hidden email]> > > > >############################################################# > >This message is sent to you because you are subscribed to >the mailing list Lasso [hidden email] >Official list archives available at http://www.lassotalk.com >To unsubscribe, E-mail to: <[hidden email]> >Send administrative queries to <[hidden email]> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Steve Piercy Website Builder Eugene, OR <[hidden email]> <http://www.stevepiercy.com/> ############################################################# This message is sent to you because you are subscribed to the mailing list Lasso [hidden email] Official list archives available at http://www.lassotalk.com To unsubscribe, E-mail to: <[hidden email]> Send administrative queries to <[hidden email]> |
Yes, this:
<?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err code='1' msg='Invalid parameter: token'/></rsp> is the output of $XML_String. I double-checked $post_values and it is different than what I am sending to janrain vs the test tool. $post_values when using janrain test tool: post_values: array: (pair: (token)=(79f8da44361a12b9f3a1bda8a65ecaf2a31b9089)), (pair: (apiKey)=(cfadf2a01a64708548ca58898b5270a3706398a1)), (pair: (extended)=(true)), (pair: (format)=(xml)) $post_values when implemented on my site: post_values: array: (pair: (token)=(857a4d60d3f3cfc16fb1c6e214ae897bb9b11651 857a4d60d3f3cfc16fb1c6e214ae897bb9b11651)), (pair: (apiKey)=(cfadf2a01a64708548ca58898b5270a3706398a1)), (pair: (extended)=(true)), (pair: (format)=(xml)) Here's how I create $post_values: [var:'token'=(action_param:'token')] [Include:'_apikey.inc'] [var:'post_values'=(array(pair('token' = #token), pair('apiKey' = $apikey), pair('extended' = 'true'), pair('format' = 'xml')))] [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', -POSTparams = #post_values)] post_values: [var:'post_values']<BR><BR> Notice the two tokens with the same value in the array when implemented on my site, only one with the test tool. If I remove the [var:'token'=(action_param:'token')] line, I get the error message "Local variable "token" not found" when using the test tool or implemented on my site. Mike > This: > > XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err > code='1' msg='Invalid parameter: token'/></rsp> > > I assume is the output of $XML_String, correct? If so, that > would be the response from the janrain API telling you that you > sent an invalid parameter named "token". > > I would start by double-checking the value of $post_values is > what you expect to send to janrain. Test the values in the API > tester tool on janrain. > > Also ensure that you are using the correct API endpoint (i.e., > version, URL) in your include_url. > > If all looks OK, then next inspect the response from the API by > outputting $XML_String again, but do so in a textarea to avoid > HTML encoding of entities: > > <textarea>[$XML_String]</textarea> > > --steve > > > On 12/20/17 at 10:10 AM, [hidden email] (Mike Ealy) pronounced: > >> Thanks, Steve. When I use the tool at the Janrain site it works. The token >> is sent one time to my page resulting in the displayname and email to be >> populated. However, when I try it from my site, two tokens are received and >> the XML_String is invalid. >> >> >> Successful result using Janrain's test tool: >> >> Parameter Name: token >> Parameter Value: ac56e4441b3b025ffdc16abcf9c98c0c2f4778f3 >> >> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp >> stat='ok'><profile><displayName>Joe >> Smith</displayName><email>[hidden email]</email><googleUserId>1025393187 >> 07480245999</googleUserId> >> ... >> <providerName>Google+</providerName><providerSpecifier>googleplus</providerS >> pecifier> >> ... >> </rsp> >> >> Result: >> var:displayname = Joe Smith >> var:un = [hidden email] >> >> >> Unsuccessful result implemented on my site: >> >> Parameter Name: token >> Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 >> >> Parameter Name: provider >> Parameter Value: googleplus >> >> Parameter Name: token >> Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 >> >> Parameter Name: widget_type >> Parameter Value: auth >> >> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err >> code='1' msg='Invalid parameter: token'/></rsp> >> >> >> Thanks for your help. >> >> Mike >> >> >>> xml_tree is loading just fine, otherwise you would have seen an >>> error on line 26. >>> >>> The issue is most likely an XML object that the parser does not >>> understand, or JanRain changed its API response. I'd start >>> upstream and verify that the XML node you seek actually exists >>> and is in the proper format. >>> >>> --steve >>> >>> >>> On 12/19/17 at 2:13 PM, [hidden email] (Mike Ealy) pronounced: >>> >>>> Hello All, >>>> I've been using JanRain's Engage widget along with Jason >>>> Huck's XML_tree tag >>>> for a few years now. It recently stopped working and I'm trying to figure >>>> out why. My code has not changed. I think XML_tree.inc has stopped loading >>>> at startup. >>>> I'm getting this error when I try to load the page that >>>> uses the tag. >>>> Error Message: >>>> No tag, type or constant was defined under the name string->displayname. >>>> at: /mysite.com/_pageToLoad.html on line: 28 at position: 38 >>>> Error Code: -9948 >>>> Code from page (see line 28 below): >>>> [var:'token'=(action_param:'token')] >>>> [Include:'_apikey.inc'] <!--apikey from Janrain --> >>>> [var:'post_values'=(array(pair('token' = #token), >>>> pair('apiKey' = $apikey), >>>> pair('extended' = 'true'), pair('format' = 'xml')))] >>>> [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >>>> -POSTparams = #post_values)] >>>> <!-- xml_tree Lasso Tag is used to extract Name and Email >>>> from the returned XML file --> >>>> [var:'myxml'=(xml_tree($XML_String))] >>>> [var:'displayname'=($myxml->profile->displayname)] <!--*** >>>> LINE 28 ***--> >>>> [var:'email'=($myxml->profile->email)] >>>> ... >>>> Any thoughts on how to proceed? >>>> Thanks, >>>> Mike >>>> ############################################################# >>>> This message is sent to you because you are subscribed to >>>> the mailing list Lasso [hidden email] >>>> Official list archives available at http://www.lassotalk.com >>>> To unsubscribe, E-mail to: <[hidden email]> >>>> Send administrative queries to <[hidden email]> >>> >>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>> Steve Piercy Website Builder Eugene, OR >>> <[hidden email]> <http://www.stevepiercy.com/> >>> >>> >>> ############################################################# >>> >>> This message is sent to you because you are subscribed to >>> the mailing list Lasso [hidden email] >>> Official list archives available at http://www.lassotalk.com >>> To unsubscribe, E-mail to: <[hidden email]> >>> Send administrative queries to <[hidden email]> >> >> >> >> ############################################################# >> >> This message is sent to you because you are subscribed to >> the mailing list Lasso [hidden email] >> Official list archives available at http://www.lassotalk.com >> To unsubscribe, E-mail to: <[hidden email]> >> Send administrative queries to <[hidden email]> > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > Steve Piercy Website Builder Eugene, OR > <[hidden email]> <http://www.stevepiercy.com/> > > > ############################################################# > > This message is sent to you because you are subscribed to > the mailing list Lasso [hidden email] > Official list archives available at http://www.lassotalk.com > To unsubscribe, E-mail to: <[hidden email]> > Send administrative queries to <[hidden email]> ############################################################# This message is sent to you because you are subscribed to the mailing list Lasso [hidden email] Official list archives available at http://www.lassotalk.com To unsubscribe, E-mail to: <[hidden email]> Send administrative queries to <[hidden email]> |
The difference in the value for `token` between the janrain test
tool and what you send to their API is likely the issue. I noticed that you have an interesting value for your token: (token)=(857a4d60d3f3cfc16fb1c6e214ae897bb9b11651 857a4d60d3f3cfc16fb1c6e214ae897bb9b11651) Notice it is repeated, with a space separating the identical parts? That looks fishy to me. I think you need to trace back to where that value is set. Ah, here it is: [var:'token'=(action_param:'token')] ... [var:'post_values'=(array(pair('token' = #token), pair('apiKey' = $apikey), Notice you mix var/$ with local/# ? I missed that earlier. You should be consistent with your variable types. Try this: [local('token') = action_param('token')] Then make sure that the value for #token and your $post_values value are what you expect. --steve On 12/20/17 at 12:17 PM, [hidden email] (Mike Ealy) pronounced: >Yes, this: > ><?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err code='1' >msg='Invalid parameter: token'/></rsp> > >is the output of $XML_String. I double-checked $post_values and it is >different than what I am sending to janrain vs the test tool. > >$post_values when using janrain test tool: > >post_values: array: (pair: >(token)=(79f8da44361a12b9f3a1bda8a65ecaf2a31b9089)), (pair: >(apiKey)=(cfadf2a01a64708548ca58898b5270a3706398a1)), (pair: >(extended)=(true)), (pair: (format)=(xml)) > > >$post_values when implemented on my site: > >post_values: array: (pair: (token)=(857a4d60d3f3cfc16fb1c6e214ae897bb9b11651 >857a4d60d3f3cfc16fb1c6e214ae897bb9b11651)), (pair: >(apiKey)=(cfadf2a01a64708548ca58898b5270a3706398a1)), (pair: >(extended)=(true)), (pair: (format)=(xml)) > > >Here's how I create $post_values: > >[var:'token'=(action_param:'token')] >[Include:'_apikey.inc'] > >[var:'post_values'=(array(pair('token' = #token), pair('apiKey' = $apikey), >pair('extended' = 'true'), pair('format' = 'xml')))] >[var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >-POSTparams = #post_values)] > >post_values: [var:'post_values']<BR><BR> > >Notice the two tokens with the same value in the array when implemented on >my site, only one with the test tool. If I remove the >[var:'token'=(action_param:'token')] line, I get the error message "Local >variable "token" not found" when using the test tool or implemented on my >site. > >Mike > > >>This: >> >>XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err >>code='1' msg='Invalid parameter: token'/></rsp> >> >>I assume is the output of $XML_String, correct? If so, that >>would be the response from the janrain API telling you that you >>sent an invalid parameter named "token". >> >>I would start by double-checking the value of $post_values is >>what you expect to send to janrain. Test the values in the API >>tester tool on janrain. >> >>Also ensure that you are using the correct API endpoint (i.e., >>version, URL) in your include_url. >> >>If all looks OK, then next inspect the response from the API by >>outputting $XML_String again, but do so in a textarea to avoid >>HTML encoding of entities: >> >><textarea>[$XML_String]</textarea> >> >>--steve >> >> >>On 12/20/17 at 10:10 AM, [hidden email] (Mike Ealy) pronounced: >> >>> Thanks, Steve. When I use the tool at the Janrain site it works. The token >>> is sent one time to my page resulting in the displayname and email to be >>> populated. However, when I try it from my site, two tokens are received and >>> the XML_String is invalid. >>> Successful result using Janrain's test tool: >>> Parameter Name: token >>> Parameter Value: ac56e4441b3b025ffdc16abcf9c98c0c2f4778f3 >>> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp >>> stat='ok'><profile><displayName>Joe >>> Smith</displayName><email>[hidden email]</email><googleUserId>1025393187 >>> 07480245999</googleUserId> >>> ... >>> <providerName>Google+</providerName><providerSpecifier>googleplus</providerS >>> pecifier> >>> ... >>> </rsp> >>> Result: >>> var:displayname = Joe Smith >>> var:un = [hidden email] >>> Unsuccessful result implemented on my site: >>> Parameter Name: token >>> Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 >>> Parameter Name: provider >>> Parameter Value: googleplus >>> Parameter Name: token >>> Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 >>> Parameter Name: widget_type >>> Parameter Value: auth >>> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err >>> code='1' msg='Invalid parameter: token'/></rsp> >>> Thanks for your help. >>> Mike >>> >>>> xml_tree is loading just fine, otherwise you would have seen an >>>> error on line 26. >>>> The issue is most likely an XML object that the parser >>>>does not >>>> understand, or JanRain changed its API response. I'd start >>>> upstream and verify that the XML node you seek actually exists >>>> and is in the proper format. >>>> --steve >>>> On 12/19/17 at 2:13 PM, [hidden email] (Mike >>>>Ealy) pronounced: >>>> >>>>> Hello All, >>>>> I've been using JanRain's Engage widget along with Jason >>>>> Huck's XML_tree tag >>>>> for a few years now. It recently stopped working and I'm trying to figure >>>>> out why. My code has not changed. I think XML_tree.inc has stopped loading >>>>> at startup. >>>>> I'm getting this error when I try to load the page that >>>>> uses the tag. >>>>> Error Message: >>>>> No tag, type or constant was defined under the name string->displayname. >>>>> at: /mysite.com/_pageToLoad.html on line: 28 at position: 38 >>>>> Error Code: -9948 >>>>> Code from page (see line 28 below): >>>>> [var:'token'=(action_param:'token')] >>>>> [Include:'_apikey.inc'] <!--apikey from Janrain --> >>>>> [var:'post_values'=(array(pair('token' = #token), >>>>> pair('apiKey' = $apikey), >>>>> pair('extended' = 'true'), pair('format' = 'xml')))] >>>>> [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >>>>> -POSTparams = #post_values)] >>>>> <!-- xml_tree Lasso Tag is used to extract Name and Email >>>>> from the returned XML file --> >>>>> [var:'myxml'=(xml_tree($XML_String))] >>>>> [var:'displayname'=($myxml->profile->displayname)] <!--*** >>>>> LINE 28 ***--> >>>>> [var:'email'=($myxml->profile->email)] >>>>> ... >>>>> Any thoughts on how to proceed? >>>>> Thanks, >>>>> Mike >>>>> ############################################################# >>>>> This message is sent to you because you are subscribed to >>>>> the mailing list Lasso [hidden email] >>>>> Official list archives available at http://www.lassotalk.com >>>>> To unsubscribe, E-mail to: <[hidden email]> >>>>> Send administrative queries to <[hidden email]> >>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>-- -- -- >>>> Steve Piercy Website Builder Eugene, OR >>>> <[hidden email]> <http://www.stevepiercy.com/> >>>> ############################################################# >>>> This message is sent to you because you are subscribed to >>>> the mailing list Lasso [hidden email] >>>> Official list archives available at http://www.lassotalk.com >>>> To unsubscribe, E-mail to: <[hidden email]> >>>> Send administrative queries to <[hidden email]> >>> ############################################################# >>> This message is sent to you because you are subscribed to >>> the mailing list Lasso [hidden email] >>> Official list archives available at http://www.lassotalk.com >>> To unsubscribe, E-mail to: <[hidden email]> >>> Send administrative queries to <[hidden email]> >> >>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>Steve Piercy Website Builder Eugene, OR >><[hidden email]> <http://www.stevepiercy.com/> >> >> >>############################################################# >> >>This message is sent to you because you are subscribed to >>the mailing list Lasso [hidden email] >>Official list archives available at http://www.lassotalk.com >>To unsubscribe, E-mail to: <[hidden email]> >>Send administrative queries to <[hidden email]> > > > >############################################################# > >This message is sent to you because you are subscribed to >the mailing list Lasso [hidden email] >Official list archives available at http://www.lassotalk.com >To unsubscribe, E-mail to: <[hidden email]> >Send administrative queries to <[hidden email]> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Steve Piercy Website Builder Eugene, OR <[hidden email]> <http://www.stevepiercy.com/> ############################################################# This message is sent to you because you are subscribed to the mailing list Lasso [hidden email] Official list archives available at http://www.lassotalk.com To unsubscribe, E-mail to: <[hidden email]> Send administrative queries to <[hidden email]> |
I see what you're saying. But if I back up even further and compare the
source code of each page when using Janrain's test tool vs my site, the parameters I'm receiving are different. While the creation of each page is out of my control, Janrain test tool works and mine doesn't. USING MY SITE ONLY: <!DOCTYPE html><html lang='en'> <head><meta charset='utf-8'/><title></title></head> <body> <p>Redirecting to https://mysite.com/page.html</p> <form action="https://mysite.com/page.html?token=1ebac4fde1f540c92297fbfbb0ad9df8c 9540b49" method="POST"> <input type='hidden' name='provider' value='googleplus'/> <input type='hidden' name='token' value='1ebac4fde1f540c92297fbfbb0ad9df8c9540b49'/> <input type='hidden' name='widget_type' value='auth'/> <noscript><input type="submit" value="Continue"></noscript> </form> <script>document.forms[0].submit();</script> </body> </html> RETURNS: Parameter Name: token Parameter Value: 3e872e2a0a2adcdbda1f35b9ef193850918fbac8 Parameter Name: provider Parameter Value: googleplus Parameter Name: token Parameter Value: 3e872e2a0a2adcdbda1f35b9ef193850918fbac8 Parameter Name: widget_type Parameter Value: auth USING JANRAIN TEST TOOL: <html> <head> <script type="text/javascript"> function ol() { if (document.forms[1].visited.value) { window.history.go(-1); } else { document.forms[1].visited.value = 'yes'; //if (window == window.top) { document.forms[0].submit(); //} } } </script> </head> <body onload="ol();"> Waiting for https://mysite.com... <form action="https://mysite.com/page.html" method="POST"> <input id="token" name="token" type="hidden" value="2dccc7d5afbd8d78b7ab83e0126f233816fef8d3" /> <noscript><input type="submit" value="Continue"></noscript> </form> <form><input type="hidden" name="visited"/></form> </body> </html> RETURNS: Parameter Name: token Parameter Value: 109dea8368f62d8aaf1357aa69f06cc6efd88b67 > The difference in the value for `token` between the janrain test > tool and what you send to their API is likely the issue. > > I noticed that you have an interesting value for your token: > > (token)=(857a4d60d3f3cfc16fb1c6e214ae897bb9b11651 > 857a4d60d3f3cfc16fb1c6e214ae897bb9b11651) > > Notice it is repeated, with a space separating the identical > parts? That looks fishy to me. I think you need to trace back > to where that value is set. Ah, here it is: > > [var:'token'=(action_param:'token')] > ... > [var:'post_values'=(array(pair('token' = #token), pair('apiKey' > = $apikey), > > Notice you mix var/$ with local/# ? I missed that earlier. You > should be consistent with your variable types. Try this: > > [local('token') = action_param('token')] > > Then make sure that the value for #token and your $post_values > value are what you expect. > > --steve > > > On 12/20/17 at 12:17 PM, [hidden email] (Mike Ealy) pronounced: > >> Yes, this: >> >> <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err code='1' >> msg='Invalid parameter: token'/></rsp> >> >> is the output of $XML_String. I double-checked $post_values and it is >> different than what I am sending to janrain vs the test tool. >> >> $post_values when using janrain test tool: >> >> post_values: array: (pair: >> (token)=(79f8da44361a12b9f3a1bda8a65ecaf2a31b9089)), (pair: >> (apiKey)=(cfadf2a01a64708548ca58898b5270a3706398a1)), (pair: >> (extended)=(true)), (pair: (format)=(xml)) >> >> >> $post_values when implemented on my site: >> >> post_values: array: (pair: (token)=(857a4d60d3f3cfc16fb1c6e214ae897bb9b11651 >> 857a4d60d3f3cfc16fb1c6e214ae897bb9b11651)), (pair: >> (apiKey)=(cfadf2a01a64708548ca58898b5270a3706398a1)), (pair: >> (extended)=(true)), (pair: (format)=(xml)) >> >> >> Here's how I create $post_values: >> >> [var:'token'=(action_param:'token')] >> [Include:'_apikey.inc'] >> >> [var:'post_values'=(array(pair('token' = #token), pair('apiKey' = $apikey), >> pair('extended' = 'true'), pair('format' = 'xml')))] >> [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >> -POSTparams = #post_values)] >> >> post_values: [var:'post_values']<BR><BR> >> >> Notice the two tokens with the same value in the array when implemented on >> my site, only one with the test tool. If I remove the >> [var:'token'=(action_param:'token')] line, I get the error message "Local >> variable "token" not found" when using the test tool or implemented on my >> site. >> >> Mike >> >> >>> This: >>> >>> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err >>> code='1' msg='Invalid parameter: token'/></rsp> >>> >>> I assume is the output of $XML_String, correct? If so, that >>> would be the response from the janrain API telling you that you >>> sent an invalid parameter named "token". >>> >>> I would start by double-checking the value of $post_values is >>> what you expect to send to janrain. Test the values in the API >>> tester tool on janrain. >>> >>> Also ensure that you are using the correct API endpoint (i.e., >>> version, URL) in your include_url. >>> >>> If all looks OK, then next inspect the response from the API by >>> outputting $XML_String again, but do so in a textarea to avoid >>> HTML encoding of entities: >>> >>> <textarea>[$XML_String]</textarea> >>> >>> --steve >>> >>> >>> On 12/20/17 at 10:10 AM, [hidden email] (Mike Ealy) pronounced: >>> >>>> Thanks, Steve. When I use the tool at the Janrain site it works. The token >>>> is sent one time to my page resulting in the displayname and email to be >>>> populated. However, when I try it from my site, two tokens are received and >>>> the XML_String is invalid. >>>> Successful result using Janrain's test tool: >>>> Parameter Name: token >>>> Parameter Value: ac56e4441b3b025ffdc16abcf9c98c0c2f4778f3 >>>> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp >>>> stat='ok'><profile><displayName>Joe >>>> 7 >>>> 07480245999</googleUserId> >>>> ... >>>> <providerName>Google+</providerName><providerSpecifier>googleplus</provider>>>> S >>>> pecifier> >>>> ... >>>> </rsp> >>>> Result: >>>> var:displayname = Joe Smith >>>> var:un = [hidden email] >>>> Unsuccessful result implemented on my site: >>>> Parameter Name: token >>>> Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 >>>> Parameter Name: provider >>>> Parameter Value: googleplus >>>> Parameter Name: token >>>> Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 >>>> Parameter Name: widget_type >>>> Parameter Value: auth >>>> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err >>>> code='1' msg='Invalid parameter: token'/></rsp> >>>> Thanks for your help. >>>> Mike >>>> >>>>> xml_tree is loading just fine, otherwise you would have seen an >>>>> error on line 26. >>>>> The issue is most likely an XML object that the parser >>>>> does not >>>>> understand, or JanRain changed its API response. I'd start >>>>> upstream and verify that the XML node you seek actually exists >>>>> and is in the proper format. >>>>> --steve >>>>> On 12/19/17 at 2:13 PM, [hidden email] (Mike >>>>> Ealy) pronounced: >>>>> >>>>>> Hello All, >>>>>> I've been using JanRain's Engage widget along with Jason >>>>>> Huck's XML_tree tag >>>>>> for a few years now. It recently stopped working and I'm trying to figure >>>>>> out why. My code has not changed. I think XML_tree.inc has stopped >>>>>> loading >>>>>> at startup. >>>>>> I'm getting this error when I try to load the page that >>>>>> uses the tag. >>>>>> Error Message: >>>>>> No tag, type or constant was defined under the name string->displayname. >>>>>> at: /mysite.com/_pageToLoad.html on line: 28 at position: 38 >>>>>> Error Code: -9948 >>>>>> Code from page (see line 28 below): >>>>>> [var:'token'=(action_param:'token')] >>>>>> [Include:'_apikey.inc'] <!--apikey from Janrain --> >>>>>> [var:'post_values'=(array(pair('token' = #token), >>>>>> pair('apiKey' = $apikey), >>>>>> pair('extended' = 'true'), pair('format' = 'xml')))] >>>>>> [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >>>>>> -POSTparams = #post_values)] >>>>>> <!-- xml_tree Lasso Tag is used to extract Name and Email >>>>>> from the returned XML file --> >>>>>> [var:'myxml'=(xml_tree($XML_String))] >>>>>> [var:'displayname'=($myxml->profile->displayname)] <!--*** >>>>>> LINE 28 ***--> >>>>>> [var:'email'=($myxml->profile->email)] >>>>>> ... >>>>>> Any thoughts on how to proceed? >>>>>> Thanks, >>>>>> Mike >>>>>> ############################################################# >>>>>> This message is sent to you because you are subscribed to >>>>>> the mailing list Lasso [hidden email] >>>>>> Official list archives available at http://www.lassotalk.com >>>>>> To unsubscribe, E-mail to: <[hidden email]> >>>>>> Send administrative queries to <[hidden email]> >>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>> -- -- -- >>>>> Steve Piercy Website Builder Eugene, OR >>>>> <[hidden email]> <http://www.stevepiercy.com/> >>>>> ############################################################# >>>>> This message is sent to you because you are subscribed to >>>>> the mailing list Lasso [hidden email] >>>>> Official list archives available at http://www.lassotalk.com >>>>> To unsubscribe, E-mail to: <[hidden email]> >>>>> Send administrative queries to <[hidden email]> >>>> ############################################################# >>>> This message is sent to you because you are subscribed to >>>> the mailing list Lasso [hidden email] >>>> Official list archives available at http://www.lassotalk.com >>>> To unsubscribe, E-mail to: <[hidden email]> >>>> Send administrative queries to <[hidden email]> >>> >>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>> Steve Piercy Website Builder Eugene, OR >>> <[hidden email]> <http://www.stevepiercy.com/> >>> >>> >>> ############################################################# >>> >>> This message is sent to you because you are subscribed to >>> the mailing list Lasso [hidden email] >>> Official list archives available at http://www.lassotalk.com >>> To unsubscribe, E-mail to: <[hidden email]> >>> Send administrative queries to <[hidden email]> >> >> >> >> ############################################################# >> >> This message is sent to you because you are subscribed to >> the mailing list Lasso [hidden email] >> Official list archives available at http://www.lassotalk.com >> To unsubscribe, E-mail to: <[hidden email]> >> Send administrative queries to <[hidden email]> > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > Steve Piercy Website Builder Eugene, OR > <[hidden email]> <http://www.stevepiercy.com/> > > > ############################################################# > > This message is sent to you because you are subscribed to > the mailing list Lasso [hidden email] > Official list archives available at http://www.lassotalk.com > To unsubscribe, E-mail to: <[hidden email]> > Send administrative queries to <[hidden email]> ############################################################# This message is sent to you because you are subscribed to the mailing list Lasso [hidden email] Official list archives available at http://www.lassotalk.com To unsubscribe, E-mail to: <[hidden email]> Send administrative queries to <[hidden email]> |
The problem is that you are sending the parameter "token" as
both a GET and a POST parameter, which gets merged into the faulty token value repeated with a space separation. Don't do that. Remove either the GET parameter "token" in your form action or the hidden input "token". You should not have both. <form action="https://mysite.com/page.html?token=1ebac4fde1f540c92297fbfbb0ad9df8c9540b49" method="POST"> <input type='hidden' name='token' value='1ebac4fde1f540c92297fbfbb0ad9df8c9540b49'/> --steve On 12/20/17 at 2:26 PM, [hidden email] (Mike Ealy) pronounced: >I see what you're saying. But if I back up even further and compare the >source code of each page when using Janrain's test tool vs my site, the >parameters I'm receiving are different. While the creation of each page is >out of my control, Janrain test tool works and mine doesn't. > > >USING MY SITE ONLY: > ><!DOCTYPE html><html lang='en'> ><head><meta charset='utf-8'/><title></title></head> ><body> ><p>Redirecting to https://mysite.com/page.html</p> ><form action="https://mysite.com/page.html?token=1ebac4fde1f540c92297fbfbb0ad9df8c >9540b49" method="POST"> ><input type='hidden' name='provider' value='googleplus'/> ><input type='hidden' name='token' >value='1ebac4fde1f540c92297fbfbb0ad9df8c9540b49'/> ><input type='hidden' name='widget_type' value='auth'/> ><noscript><input type="submit" value="Continue"></noscript> ></form> ><script>document.forms[0].submit();</script> ></body> ></html> > >RETURNS: > >Parameter Name: token >Parameter Value: 3e872e2a0a2adcdbda1f35b9ef193850918fbac8 > >Parameter Name: provider >Parameter Value: googleplus > >Parameter Name: token >Parameter Value: 3e872e2a0a2adcdbda1f35b9ef193850918fbac8 > >Parameter Name: widget_type >Parameter Value: auth > > >USING JANRAIN TEST TOOL: > ><html> ><head> ><script type="text/javascript"> >function ol() { >if (document.forms[1].visited.value) { >window.history.go(-1); >} else { >document.forms[1].visited.value = 'yes'; >//if (window == window.top) { >document.forms[0].submit(); >//} >} >} ></script> ></head> ><body onload="ol();"> >Waiting for https://mysite.com... ><form action="https://mysite.com/page.html" method="POST"> ><input id="token" name="token" type="hidden" >value="2dccc7d5afbd8d78b7ab83e0126f233816fef8d3" /> ><noscript><input type="submit" value="Continue"></noscript> ></form> ><form><input type="hidden" name="visited"/></form> ></body> ></html> > >RETURNS: > >Parameter Name: token >Parameter Value: 109dea8368f62d8aaf1357aa69f06cc6efd88b67 > > > > > > >>The difference in the value for `token` between the janrain test >>tool and what you send to their API is likely the issue. >> >>I noticed that you have an interesting value for your token: >> >>(token)=(857a4d60d3f3cfc16fb1c6e214ae897bb9b11651 >>857a4d60d3f3cfc16fb1c6e214ae897bb9b11651) >> >>Notice it is repeated, with a space separating the identical >>parts? That looks fishy to me. I think you need to trace back >>to where that value is set. Ah, here it is: >> >>[var:'token'=(action_param:'token')] >>... >>[var:'post_values'=(array(pair('token' = #token), pair('apiKey' >>= $apikey), >> >>Notice you mix var/$ with local/# ? I missed that earlier. You >>should be consistent with your variable types. Try this: >> >>[local('token') = action_param('token')] >> >>Then make sure that the value for #token and your $post_values >>value are what you expect. >> >>--steve >> >> >>On 12/20/17 at 12:17 PM, [hidden email] (Mike Ealy) pronounced: >> >>> Yes, this: >>> <?xml version='1.0' encoding='UTF-8'?><rsp >>>stat='fail'><err code='1' >>> msg='Invalid parameter: token'/></rsp> >>> is the output of $XML_String. I double-checked >>>$post_values and it is >>> different than what I am sending to janrain vs the test tool. >>> $post_values when using janrain test tool: >>> post_values: array: (pair: >>> (token)=(79f8da44361a12b9f3a1bda8a65ecaf2a31b9089)), (pair: >>> (apiKey)=(cfadf2a01a64708548ca58898b5270a3706398a1)), (pair: >>> (extended)=(true)), (pair: (format)=(xml)) >>> $post_values when implemented on my site: >>> post_values: array: (pair: (token)=(857a4d60d3f3cfc16fb1c6e214ae897bb9b11651 >>> 857a4d60d3f3cfc16fb1c6e214ae897bb9b11651)), (pair: >>> (apiKey)=(cfadf2a01a64708548ca58898b5270a3706398a1)), (pair: >>> (extended)=(true)), (pair: (format)=(xml)) >>> Here's how I create $post_values: >>> [var:'token'=(action_param:'token')] >>> [Include:'_apikey.inc'] >>> [var:'post_values'=(array(pair('token' = #token), >>>pair('apiKey' = $apikey), >>> pair('extended' = 'true'), pair('format' = 'xml')))] >>> [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >>> -POSTparams = #post_values)] >>> post_values: [var:'post_values']<BR><BR> >>> Notice the two tokens with the same value in the array >>>when implemented on >>> my site, only one with the test tool. If I remove the >>> [var:'token'=(action_param:'token')] line, I get the error message "Local >>> variable "token" not found" when using the test tool or implemented on my >>> site. >>> Mike >>> >>>> This: >>>> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err >>>> code='1' msg='Invalid parameter: token'/></rsp> >>>> I assume is the output of $XML_String, correct? If so, that >>>> would be the response from the janrain API telling you that you >>>> sent an invalid parameter named "token". >>>> I would start by double-checking the value of >>>>$post_values is >>>> what you expect to send to janrain. Test the values in the API >>>> tester tool on janrain. >>>> Also ensure that you are using the correct API endpoint (i.e., >>>> version, URL) in your include_url. >>>> If all looks OK, then next inspect the response from the >>>>API by >>>> outputting $XML_String again, but do so in a textarea to avoid >>>> HTML encoding of entities: >>>> <textarea>[$XML_String]</textarea> >>>> --steve >>>> On 12/20/17 at 10:10 AM, [hidden email] (Mike >>>>Ealy) pronounced: >>>> >>>>> Thanks, Steve. When I use the tool at the Janrain site it works. The token >>>>> is sent one time to my page resulting in the displayname and email to be >>>>> populated. However, when I try it from my site, two tokens are received and >>>>> the XML_String is invalid. >>>>> Successful result using Janrain's test tool: >>>>> Parameter Name: token >>>>> Parameter Value: ac56e4441b3b025ffdc16abcf9c98c0c2f4778f3 >>>>> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp >>>>> stat='ok'><profile><displayName>Joe >>>>> >Smith</displayName><email>[hidden email]</email><googleUserId>102539318>>>> >7 >>>>> 07480245999</googleUserId> >>>>> ... >>>>> ><providerName>Google+</providerName><providerSpecifier>googleplus</provider>>>> >S >>>>> pecifier> >>>>> ... >>>>> </rsp> >>>>> Result: >>>>> var:displayname = Joe Smith >>>>> var:un = [hidden email] >>>>> Unsuccessful result implemented on my site: >>>>> Parameter Name: token >>>>> Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 >>>>> Parameter Name: provider >>>>> Parameter Value: googleplus >>>>> Parameter Name: token >>>>> Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 >>>>> Parameter Name: widget_type >>>>> Parameter Value: auth >>>>> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err >>>>> code='1' msg='Invalid parameter: token'/></rsp> >>>>> Thanks for your help. >>>>> Mike >>>>> >>>>>> xml_tree is loading just fine, otherwise you would have seen an >>>>>> error on line 26. >>>>>> The issue is most likely an XML object that the parser >>>>>> does not >>>>>> understand, or JanRain changed its API response. I'd start >>>>>> upstream and verify that the XML node you seek actually exists >>>>>> and is in the proper format. >>>>>> --steve >>>>>> On 12/19/17 at 2:13 PM, [hidden email] (Mike >>>>>> Ealy) pronounced: >>>>>> >>>>>>> Hello All, >>>>>>> I've been using JanRain's Engage widget along with Jason >>>>>>> Huck's XML_tree tag >>>>>>> for a few years now. It recently stopped working and I'm trying to figure >>>>>>> out why. My code has not changed. I think XML_tree.inc has stopped >>>>>>> loading >>>>>>> at startup. >>>>>>> I'm getting this error when I try to load the page that >>>>>>> uses the tag. >>>>>>> Error Message: >>>>>>> No tag, type or constant was defined under the name string->displayname. >>>>>>> at: /mysite.com/_pageToLoad.html on line: 28 at position: 38 >>>>>>> Error Code: -9948 >>>>>>> Code from page (see line 28 below): >>>>>>> [var:'token'=(action_param:'token')] >>>>>>> [Include:'_apikey.inc'] <!--apikey from Janrain --> >>>>>>> [var:'post_values'=(array(pair('token' = #token), >>>>>>> pair('apiKey' = $apikey), >>>>>>> pair('extended' = 'true'), pair('format' = 'xml')))] >>>>>>> [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >>>>>>> -POSTparams = #post_values)] >>>>>>> <!-- xml_tree Lasso Tag is used to extract Name and Email >>>>>>> from the returned XML file --> >>>>>>> [var:'myxml'=(xml_tree($XML_String))] >>>>>>> [var:'displayname'=($myxml->profile->displayname)] <!--*** >>>>>>> LINE 28 ***--> >>>>>>> [var:'email'=($myxml->profile->email)] >>>>>>> ... >>>>>>> Any thoughts on how to proceed? >>>>>>> Thanks, >>>>>>> Mike >>>>>>> ############################################################# >>>>>>> This message is sent to you because you are subscribed to >>>>>>> the mailing list Lasso [hidden email] >>>>>>> Official list archives available at http://www.lassotalk.com >>>>>>> To unsubscribe, E-mail to: <[hidden email]> >>>>>>> Send administrative queries to <[hidden email]> >>>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>>> -- -- -- >>>>>> Steve Piercy Website Builder Eugene, OR >>>>>> <[hidden email]> <http://www.stevepiercy.com/> >>>>>> ############################################################# >>>>>> This message is sent to you because you are subscribed to >>>>>> the mailing list Lasso [hidden email] >>>>>> Official list archives available at http://www.lassotalk.com >>>>>> To unsubscribe, E-mail to: <[hidden email]> >>>>>> Send administrative queries to <[hidden email]> >>>>> ############################################################# >>>>> This message is sent to you because you are subscribed to >>>>> the mailing list Lasso [hidden email] >>>>> Official list archives available at http://www.lassotalk.com >>>>> To unsubscribe, E-mail to: <[hidden email]> >>>>> Send administrative queries to <[hidden email]> >>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>-- -- -- >>>> Steve Piercy Website Builder Eugene, OR >>>> <[hidden email]> <http://www.stevepiercy.com/> >>>> ############################################################# >>>> This message is sent to you because you are subscribed to >>>> the mailing list Lasso [hidden email] >>>> Official list archives available at http://www.lassotalk.com >>>> To unsubscribe, E-mail to: <[hidden email]> >>>> Send administrative queries to <[hidden email]> >>> ############################################################# >>> This message is sent to you because you are subscribed to >>> the mailing list Lasso [hidden email] >>> Official list archives available at http://www.lassotalk.com >>> To unsubscribe, E-mail to: <[hidden email]> >>> Send administrative queries to <[hidden email]> >> >>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>Steve Piercy Website Builder Eugene, OR >><[hidden email]> <http://www.stevepiercy.com/> >> >> >>############################################################# >> >>This message is sent to you because you are subscribed to >>the mailing list Lasso [hidden email] >>Official list archives available at http://www.lassotalk.com >>To unsubscribe, E-mail to: <[hidden email]> >>Send administrative queries to <[hidden email]> > > > >############################################################# > >This message is sent to you because you are subscribed to >the mailing list Lasso [hidden email] >Official list archives available at http://www.lassotalk.com >To unsubscribe, E-mail to: <[hidden email]> >Send administrative queries to <[hidden email]> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Steve Piercy Website Builder Eugene, OR <[hidden email]> <http://www.stevepiercy.com/> ############################################################# This message is sent to you because you are subscribed to the mailing list Lasso [hidden email] Official list archives available at http://www.lassotalk.com To unsubscribe, E-mail to: <[hidden email]> Send administrative queries to <[hidden email]> |
Thanks again, Steve.
> The problem is that you are sending the parameter "token" as > both a GET and a POST parameter, which gets merged into the > faulty token value repeated with a space separation. Don't do that. > > Remove either the GET parameter "token" in your form action or > the hidden input "token". You should not have both. > > <form > action="https://mysite.com/page.html?token=1ebac4fde1f540c92297fbfbb0ad9df8c95 > 40b49" > method="POST"> > <input type='hidden' name='token' > value='1ebac4fde1f540c92297fbfbb0ad9df8c9540b49'/> > > --steve > > > On 12/20/17 at 2:26 PM, [hidden email] (Mike Ealy) pronounced: > >> I see what you're saying. But if I back up even further and compare the >> source code of each page when using Janrain's test tool vs my site, the >> parameters I'm receiving are different. While the creation of each page is >> out of my control, Janrain test tool works and mine doesn't. >> >> >> USING MY SITE ONLY: >> >> <!DOCTYPE html><html lang='en'> >> <head><meta charset='utf-8'/><title></title></head> >> <body> >> <p>Redirecting to https://mysite.com/page.html</p> >> <form >> action="https://mysite.com/page.html?token=1ebac4fde1f540c92297fbfbb0ad9df8c >> 9540b49" method="POST"> >> <input type='hidden' name='provider' value='googleplus'/> >> <input type='hidden' name='token' >> value='1ebac4fde1f540c92297fbfbb0ad9df8c9540b49'/> >> <input type='hidden' name='widget_type' value='auth'/> >> <noscript><input type="submit" value="Continue"></noscript> >> </form> >> <script>document.forms[0].submit();</script> >> </body> >> </html> >> >> RETURNS: >> >> Parameter Name: token >> Parameter Value: 3e872e2a0a2adcdbda1f35b9ef193850918fbac8 >> >> Parameter Name: provider >> Parameter Value: googleplus >> >> Parameter Name: token >> Parameter Value: 3e872e2a0a2adcdbda1f35b9ef193850918fbac8 >> >> Parameter Name: widget_type >> Parameter Value: auth >> >> >> USING JANRAIN TEST TOOL: >> >> <html> >> <head> >> <script type="text/javascript"> >> function ol() { >> if (document.forms[1].visited.value) { >> window.history.go(-1); >> } else { >> document.forms[1].visited.value = 'yes'; >> //if (window == window.top) { >> document.forms[0].submit(); >> //} >> } >> } >> </script> >> </head> >> <body onload="ol();"> >> Waiting for https://mysite.com... >> <form action="https://mysite.com/page.html" method="POST"> >> <input id="token" name="token" type="hidden" >> value="2dccc7d5afbd8d78b7ab83e0126f233816fef8d3" /> >> <noscript><input type="submit" value="Continue"></noscript> >> </form> >> <form><input type="hidden" name="visited"/></form> >> </body> >> </html> >> >> RETURNS: >> >> Parameter Name: token >> Parameter Value: 109dea8368f62d8aaf1357aa69f06cc6efd88b67 >> >> >> >> >> >> >>> The difference in the value for `token` between the janrain test >>> tool and what you send to their API is likely the issue. >>> >>> I noticed that you have an interesting value for your token: >>> >>> (token)=(857a4d60d3f3cfc16fb1c6e214ae897bb9b11651 >>> 857a4d60d3f3cfc16fb1c6e214ae897bb9b11651) >>> >>> Notice it is repeated, with a space separating the identical >>> parts? That looks fishy to me. I think you need to trace back >>> to where that value is set. Ah, here it is: >>> >>> [var:'token'=(action_param:'token')] >>> ... >>> [var:'post_values'=(array(pair('token' = #token), pair('apiKey' >>> = $apikey), >>> >>> Notice you mix var/$ with local/# ? I missed that earlier. You >>> should be consistent with your variable types. Try this: >>> >>> [local('token') = action_param('token')] >>> >>> Then make sure that the value for #token and your $post_values >>> value are what you expect. >>> >>> --steve >>> >>> >>> On 12/20/17 at 12:17 PM, [hidden email] (Mike Ealy) pronounced: >>> >>>> Yes, this: >>>> <?xml version='1.0' encoding='UTF-8'?><rsp >>>> stat='fail'><err code='1' >>>> msg='Invalid parameter: token'/></rsp> >>>> is the output of $XML_String. I double-checked >>>> $post_values and it is >>>> different than what I am sending to janrain vs the test tool. >>>> $post_values when using janrain test tool: >>>> post_values: array: (pair: >>>> (token)=(79f8da44361a12b9f3a1bda8a65ecaf2a31b9089)), (pair: >>>> (apiKey)=(cfadf2a01a64708548ca58898b5270a3706398a1)), (pair: >>>> (extended)=(true)), (pair: (format)=(xml)) >>>> $post_values when implemented on my site: >>>> post_values: array: (pair: >>>> (token)=(857a4d60d3f3cfc16fb1c6e214ae897bb9b11651 >>>> 857a4d60d3f3cfc16fb1c6e214ae897bb9b11651)), (pair: >>>> (apiKey)=(cfadf2a01a64708548ca58898b5270a3706398a1)), (pair: >>>> (extended)=(true)), (pair: (format)=(xml)) >>>> Here's how I create $post_values: >>>> [var:'token'=(action_param:'token')] >>>> [Include:'_apikey.inc'] >>>> [var:'post_values'=(array(pair('token' = #token), >>>> pair('apiKey' = $apikey), >>>> pair('extended' = 'true'), pair('format' = 'xml')))] >>>> [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >>>> -POSTparams = #post_values)] >>>> post_values: [var:'post_values']<BR><BR> >>>> Notice the two tokens with the same value in the array >>>> when implemented on >>>> my site, only one with the test tool. If I remove the >>>> [var:'token'=(action_param:'token')] line, I get the error message "Local >>>> variable "token" not found" when using the test tool or implemented on my >>>> site. >>>> Mike >>>> >>>>> This: >>>>> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err >>>>> code='1' msg='Invalid parameter: token'/></rsp> >>>>> I assume is the output of $XML_String, correct? If so, that >>>>> would be the response from the janrain API telling you that you >>>>> sent an invalid parameter named "token". >>>>> I would start by double-checking the value of >>>>> $post_values is >>>>> what you expect to send to janrain. Test the values in the API >>>>> tester tool on janrain. >>>>> Also ensure that you are using the correct API endpoint (i.e., >>>>> version, URL) in your include_url. >>>>> If all looks OK, then next inspect the response from the >>>>> API by >>>>> outputting $XML_String again, but do so in a textarea to avoid >>>>> HTML encoding of entities: >>>>> <textarea>[$XML_String]</textarea> >>>>> --steve >>>>> On 12/20/17 at 10:10 AM, [hidden email] (Mike >>>>> Ealy) pronounced: >>>>> >>>>>> Thanks, Steve. When I use the tool at the Janrain site it works. The >>>>>> token >>>>>> is sent one time to my page resulting in the displayname and email to be >>>>>> populated. However, when I try it from my site, two tokens are received >>>>>> and >>>>>> the XML_String is invalid. >>>>>> Successful result using Janrain's test tool: >>>>>> Parameter Name: token >>>>>> Parameter Value: ac56e4441b3b025ffdc16abcf9c98c0c2f4778f3 >>>>>> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp >>>>>> stat='ok'><profile><displayName>Joe >>>>>> >> Smith</displayName><email>[hidden email]</email><googleUserId>102539318>> >> >> >> 7 >>>>>> 07480245999</googleUserId> >>>>>> ... >>>>>> >> <providerName>Google+</providerName><providerSpecifier>googleplus</provider>> >> >> >> S >>>>>> pecifier> >>>>>> ... >>>>>> </rsp> >>>>>> Result: >>>>>> var:displayname = Joe Smith >>>>>> var:un = [hidden email] >>>>>> Unsuccessful result implemented on my site: >>>>>> Parameter Name: token >>>>>> Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 >>>>>> Parameter Name: provider >>>>>> Parameter Value: googleplus >>>>>> Parameter Name: token >>>>>> Parameter Value: eeb8985cb9ae0c1b5eef323bfd316c8c0348a081 >>>>>> Parameter Name: widget_type >>>>>> Parameter Value: auth >>>>>> XML_String: <?xml version='1.0' encoding='UTF-8'?><rsp stat='fail'><err >>>>>> code='1' msg='Invalid parameter: token'/></rsp> >>>>>> Thanks for your help. >>>>>> Mike >>>>>> >>>>>>> xml_tree is loading just fine, otherwise you would have seen an >>>>>>> error on line 26. >>>>>>> The issue is most likely an XML object that the parser >>>>>>> does not >>>>>>> understand, or JanRain changed its API response. I'd start >>>>>>> upstream and verify that the XML node you seek actually exists >>>>>>> and is in the proper format. >>>>>>> --steve >>>>>>> On 12/19/17 at 2:13 PM, [hidden email] (Mike >>>>>>> Ealy) pronounced: >>>>>>> >>>>>>>> Hello All, >>>>>>>> I've been using JanRain's Engage widget along with Jason >>>>>>>> Huck's XML_tree tag >>>>>>>> for a few years now. It recently stopped working and I'm trying to >>>>>>>> figure >>>>>>>> out why. My code has not changed. I think XML_tree.inc has stopped >>>>>>>> loading >>>>>>>> at startup. >>>>>>>> I'm getting this error when I try to load the page that >>>>>>>> uses the tag. >>>>>>>> Error Message: >>>>>>>> No tag, type or constant was defined under the name >>>>>>>> string->displayname. >>>>>>>> at: /mysite.com/_pageToLoad.html on line: 28 at position: 38 >>>>>>>> Error Code: -9948 >>>>>>>> Code from page (see line 28 below): >>>>>>>> [var:'token'=(action_param:'token')] >>>>>>>> [Include:'_apikey.inc'] <!--apikey from Janrain --> >>>>>>>> [var:'post_values'=(array(pair('token' = #token), >>>>>>>> pair('apiKey' = $apikey), >>>>>>>> pair('extended' = 'true'), pair('format' = 'xml')))] >>>>>>>> [var:'XML_String'=include_url('https://rpxnow.com/api/v2/auth_info', >>>>>>>> -POSTparams = #post_values)] >>>>>>>> <!-- xml_tree Lasso Tag is used to extract Name and Email >>>>>>>> from the returned XML file --> >>>>>>>> [var:'myxml'=(xml_tree($XML_String))] >>>>>>>> [var:'displayname'=($myxml->profile->displayname)] <!--*** >>>>>>>> LINE 28 ***--> >>>>>>>> [var:'email'=($myxml->profile->email)] >>>>>>>> ... >>>>>>>> Any thoughts on how to proceed? >>>>>>>> Thanks, >>>>>>>> Mike >>>>>>>> ############################################################# >>>>>>>> This message is sent to you because you are subscribed to >>>>>>>> the mailing list Lasso [hidden email] >>>>>>>> Official list archives available at http://www.lassotalk.com >>>>>>>> To unsubscribe, E-mail to: <[hidden email]> >>>>>>>> Send administrative queries to <[hidden email]> >>>>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>>>> -- -- -- >>>>>>> Steve Piercy Website Builder Eugene, OR >>>>>>> <[hidden email]> <http://www.stevepiercy.com/> >>>>>>> ############################################################# >>>>>>> This message is sent to you because you are subscribed to >>>>>>> the mailing list Lasso [hidden email] >>>>>>> Official list archives available at http://www.lassotalk.com >>>>>>> To unsubscribe, E-mail to: <[hidden email]> >>>>>>> Send administrative queries to <[hidden email]> >>>>>> ############################################################# >>>>>> This message is sent to you because you are subscribed to >>>>>> the mailing list Lasso [hidden email] >>>>>> Official list archives available at http://www.lassotalk.com >>>>>> To unsubscribe, E-mail to: <[hidden email]> >>>>>> Send administrative queries to <[hidden email]> >>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>> -- -- -- >>>>> Steve Piercy Website Builder Eugene, OR >>>>> <[hidden email]> <http://www.stevepiercy.com/> >>>>> ############################################################# >>>>> This message is sent to you because you are subscribed to >>>>> the mailing list Lasso [hidden email] >>>>> Official list archives available at http://www.lassotalk.com >>>>> To unsubscribe, E-mail to: <[hidden email]> >>>>> Send administrative queries to <[hidden email]> >>>> ############################################################# >>>> This message is sent to you because you are subscribed to >>>> the mailing list Lasso [hidden email] >>>> Official list archives available at http://www.lassotalk.com >>>> To unsubscribe, E-mail to: <[hidden email]> >>>> Send administrative queries to <[hidden email]> >>> >>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>> Steve Piercy Website Builder Eugene, OR >>> <[hidden email]> <http://www.stevepiercy.com/> >>> >>> >>> ############################################################# >>> >>> This message is sent to you because you are subscribed to >>> the mailing list Lasso [hidden email] >>> Official list archives available at http://www.lassotalk.com >>> To unsubscribe, E-mail to: <[hidden email]> >>> Send administrative queries to <[hidden email]> >> >> >> >> ############################################################# >> >> This message is sent to you because you are subscribed to >> the mailing list Lasso [hidden email] >> Official list archives available at http://www.lassotalk.com >> To unsubscribe, E-mail to: <[hidden email]> >> Send administrative queries to <[hidden email]> > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > Steve Piercy Website Builder Eugene, OR > <[hidden email]> <http://www.stevepiercy.com/> > > > ############################################################# > > This message is sent to you because you are subscribed to > the mailing list Lasso [hidden email] > Official list archives available at http://www.lassotalk.com > To unsubscribe, E-mail to: <[hidden email]> > Send administrative queries to <[hidden email]> ############################################################# This message is sent to you because you are subscribed to the mailing list Lasso [hidden email] Official list archives available at http://www.lassotalk.com To unsubscribe, E-mail to: <[hidden email]> Send administrative queries to <[hidden email]> |
Free forum by Nabble | Edit this page |