Thursday 22 July 2010 10:14:22 am - 4 replies
Modified on Thursday 22 July 2010 10:15:51 am by Stéphane Le Merre
Gaetano Giunta
Thursday 22 July 2010 2:53:49 pm
What about using firebug to debug the xhr request? It will tell you if the url that you're posting to is correct, as well as the request's payload.
In the example you posted I think you might be missing some parameters to post to content/action.
Principal Consultant International Business Member of the Community Project Board
Ivo Lukac
Friday 23 July 2010 1:05:25 am
I think the problem could be in a fact that if you want to publish some content you need to have a draft already created.
Do you create a draft version of the object prior to publish?
http://www.linkedin.com/in/ivolukac http://www.netgen.hr/eng/blog http://twitter.com/ilukac
Stéphane Le Merre
Friday 23 July 2010 6:57:41 am
Thanks for answering. I found out how to solve this by watching kernel/content/action.php, eZ uses the submit button name to control :
if ( $http->hasPostVariable( 'NewButton' )) //...
So we must had a post param call NewButton in my case :
function newComment() {ldelim} var _params = {ldelim} ClassIdentifier:"comment", NodeID:"{$node.object.main_node.node_id}", ContentLanguageCode:"{ezini( 'RegionalSettings', 'ContentObjectLocale', 'site.ini')}", NewButton:"Ajouter%20un%20commentaire" {rdelim}; loadAjaxContent({"layout/set/ajax/content/action"|ezurl()},'new_comment',_params); return false; {rdelim}
And it worked.
Thanks Gaetano :)
http://www.ligams.com
Andy Caiger
Monday 25 April 2011 1:37:50 am
Sounds interesting...
I'd love to see the complete solution for this!
EAB - Integrated Internet Success Offices in England, France & China. http://www.eab.co.uk http://www.eab-china.com http://www.eab-france.com
You must be logged in to post messages in this topic!