You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@shindig.apache.org by Justine25 <ju...@email.it> on 2012/10/31 11:39:12 UTC

shindig problems

Hello,&nbsp;


I'm new to Shindig and I have a big problem (I searched everywhere and
did'nt find any answer).


I installed and configured it on a ubuntu machine. I've checked, php is ok,
curl, json, mcrypt and simplexml are enabled, Apache is in mod_rewrite
on.&nbsp;


&nbsp;


I tested my shindig and I have this problem: when in the gadget there's a
call to a json file (I
tested&nbsp;http://gadget-doc-examples.googlecode.com/svn/trunk/opensocial-gadgets/json-data.txt
this data, found in an gadget examples) or to a php script that return a
json structure, there is no data.


&nbsp;


function makeJSONRequest() { &nbsp; &nbsp;


&nbsp; &nbsp; &nbsp; var params = {};


&nbsp; &nbsp; &nbsp; params[gadgets.io.RequestParameters.CONTENT_TYPE] =
gadgets.io.ContentType.JSON;


&nbsp; &nbsp; &nbsp; // This URL returns a JSON-encoded string that
represents a JavaScript object


&nbsp; &nbsp; &nbsp; var url =
"http://gadget-doc-examples.googlecode.com/svn/trunk/opensocial-gadgets/json-data.txt";


&nbsp; &nbsp; &nbsp; gadgets.io.makeRequest(url, response, params);


&nbsp; &nbsp; };


&nbsp;


&nbsp; &nbsp; function response(obj) {&nbsp;


&nbsp; &nbsp; &nbsp; var jsondata = obj.data;


&nbsp; // code...


&nbsp; &nbsp;&nbsp;


&nbsp; &nbsp; &nbsp;};


&nbsp; &nbsp; &nbsp;gadgets.util.registerOnLoadHandler(makeJSONRequest);


&nbsp;


The jsondata variable is empty.&nbsp;


&nbsp;


I checked with httpfox the calls, and I saw that where I have an url in this
format


http://${cur['default.domain.locked.client']}/gadgets/makeRequest?url=https....
(the url of the gadget and other params)


But I find strange that there is the JS variable instead of the name of the
host. &nbsp;


&nbsp;


&nbsp;


Where did I make the mistake?


I checked container.js, but I don't know if I have to change something
there...


&nbsp;


Thanks in advance fo every suggestion.


&nbsp;


JD


&nbsp;


 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP
autenticato? GRATIS solo con Email.it: http://www.email.it/f
 
 Sponsor:
 Ami l'arte e vuoi arredare casa con stile? Su MisterCupido.com puoi
acquistare le RIPRODUZIONI DEI QUADRI di: Van Gogh, Monet, Klimt,
Modigliani, Cezanne, Hayez, Michelangelo, Raffaello, ecc
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12386&d=20121031


 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Ami i PELUCHE? Acquistali online su MisterCupido.com! Tante offerte su: Disney, Simpson, Spongebob, Puffi, Sette Nani, Super Mario, Barbapapà, Teletubbies, Angry Birds, ecc
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12384&d=31-10

Re: shindig problems

Posted by Henry Saputra <he...@gmail.com>.
Looks like something wrong in the PHP container parsing logic. Could
you got o the container.js and modify these lines:


// IMPORTANT: EDITME: In a locked domain configuration, these should
be changed to explicit values of
// your unlocked host. You should not use %host% or %authority%
replacements or these defaults in a
// locked domain deployment.
// Both of these values will likely be identical in a real locked
domain deployment.
"default.domain.unlocked.client" :  "%host%",
"default.domain.unlocked.server" : "%host%",

- Henry

On Wed, Oct 31, 2012 at 3:39 AM, Justine25 <ju...@email.it> wrote:
> Hello,&nbsp;
>
>
> I'm new to Shindig and I have a big problem (I searched everywhere and
> did'nt find any answer).
>
>
> I installed and configured it on a ubuntu machine. I've checked, php is ok,
> curl, json, mcrypt and simplexml are enabled, Apache is in mod_rewrite
> on.&nbsp;
>
>
> &nbsp;
>
>
> I tested my shindig and I have this problem: when in the gadget there's a
> call to a json file (I
> tested&nbsp;http://gadget-doc-examples.googlecode.com/svn/trunk/opensocial-gadgets/json-data.txt
> this data, found in an gadget examples) or to a php script that return a
> json structure, there is no data.
>
>
> &nbsp;
>
>
> function makeJSONRequest() { &nbsp; &nbsp;
>
>
> &nbsp; &nbsp; &nbsp; var params = {};
>
>
> &nbsp; &nbsp; &nbsp; params[gadgets.io.RequestParameters.CONTENT_TYPE] =
> gadgets.io.ContentType.JSON;
>
>
> &nbsp; &nbsp; &nbsp; // This URL returns a JSON-encoded string that
> represents a JavaScript object
>
>
> &nbsp; &nbsp; &nbsp; var url =
> "http://gadget-doc-examples.googlecode.com/svn/trunk/opensocial-gadgets/json-data.txt";
>
>
> &nbsp; &nbsp; &nbsp; gadgets.io.makeRequest(url, response, params);
>
>
> &nbsp; &nbsp; };
>
>
> &nbsp;
>
>
> &nbsp; &nbsp; function response(obj) {&nbsp;
>
>
> &nbsp; &nbsp; &nbsp; var jsondata = obj.data;
>
>
> &nbsp; // code...
>
>
> &nbsp; &nbsp;&nbsp;
>
>
> &nbsp; &nbsp; &nbsp;};
>
>
> &nbsp; &nbsp; &nbsp;gadgets.util.registerOnLoadHandler(makeJSONRequest);
>
>
> &nbsp;
>
>
> The jsondata variable is empty.&nbsp;
>
>
> &nbsp;
>
>
> I checked with httpfox the calls, and I saw that where I have an url in this
> format
>
>
> http://${cur['default.domain.locked.client']}/gadgets/makeRequest?url=https....
> (the url of the gadget and other params)
>
>
> But I find strange that there is the JS variable instead of the name of the
> host. &nbsp;
>
>
> &nbsp;
>
>
> &nbsp;
>
>
> Where did I make the mistake?
>
>
> I checked container.js, but I don't know if I have to change something
> there...
>
>
> &nbsp;
>
>
> Thanks in advance fo every suggestion.
>
>
> &nbsp;
>
>
> JD
>
>
> &nbsp;
>
>
>
>  --
>  Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP
> autenticato? GRATIS solo con Email.it: http://www.email.it/f
>
>  Sponsor:
>  Ami l'arte e vuoi arredare casa con stile? Su MisterCupido.com puoi
> acquistare le RIPRODUZIONI DEI QUADRI di: Van Gogh, Monet, Klimt,
> Modigliani, Cezanne, Hayez, Michelangelo, Raffaello, ecc
>  Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12386&d=20121031
>
>
>
>
>  --
>  Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
>
>  Sponsor:
>  Ami i PELUCHE? Acquistali online su MisterCupido.com! Tante offerte su: Disney, Simpson, Spongebob, Puffi, Sette Nani, Super Mario, Barbapapŕ, Teletubbies, Angry Birds, ecc
>  Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12384&d=31-10