No callback on comment submit
albataur
Joined: 2011-01-04
Posts: 7 |
![]() |
Hello ! I'm using gallery3. I have a problem when I try to add some comments. Nothing appends when I click on submit button (no errors, no confirm). {"result":"error","form":"<form action=\"\/index.php\/comments\/create\/3830\" method=\"post\" id=\"g-comment-form\"><input type="hidden" name="g3sid" value=removed for public display />\n<input type=\"hidden\" name=\"csrf\" value=\"7d4358ea17a195d26e3c747eb0bfd3b9\" \/> <fieldset>\n <legend>Ajouter un commentaire<\/legend>\n <ul>\n <li class=\"g-error\">\n <label for=\"name\" >Nom<\/label>\n <input type=\"text\" id=\"g-author\" name=\"name\" value=\"\" class=\"textbox\" \/>\n <p class=\"g-message g-error\">\n Vous devez saisir votre nom\n <\/p>\n <\/li>\n <li class=\"g-error\">\n <label for=\"email\" >Email (cach\u00e9)<\/label>\n <input type=\"text\" id=\"g-email\" name=\"email\" value=\"\" class=\"textbox\" \/>\n <p class=\"g-message g-error\">\n Vous devez saisir une adresse email valide\n <\/p>\n <\/li>\n <li>\n <label for=\"url\" >Site web (cach\u00e9)<\/label>\n <input type=\"text\" id=\"g-url\" name=\"url\" value=\"\" class=\"textbox\" \/>\n <\/li>\n <li>\n <label for=\"text\" >Commentaire<\/label>\n <textarea id=\"g-text\" name=\"text\" rows=\"\" cols=\"\" class=\"textarea\" >fgdfg<\/textarea>\n <\/li>\n <li>\n <input type=\"submit\" value=\"Ajouter\" class=\"ui-state-default ui-corner-all\" \/>\n <\/li>\n <\/ul>\n <input type=\"hidden\" name=\"item_id\" value=\"3830\" \/>\n <\/fieldset>\n<\/form>"} I tried to add some alerts into the callback function, but it seems to be never called : $("#g-comments form").ajaxForm({ dataType: "json", success: function(data) { alert('pouet1'); if (data.result == "success") { $("#g-comments #g-comment-detail ul").append(data.view); $("#g-comments #g-comment-detail ul li:last").effect("highlight", {color: "#cfc"}, 8000); $("#g-comment-form").hide(2000).remove(); $("#g-no-comments").hide(2000); } else { alert('pouet'); if (data.form) { $("#g-comments form").replaceWith(data.form); ajaxify_comment_form(); } } } }); I don't know JQuery so it's difficult for me to debug this. You can look at this on http://photos.alexis-bataille.com/index.php/Photos-Etretat-2010/P1030589 . Thanks ! |
|
albataur
Joined: 2011-01-04
Posts: 7 |
![]() |
I think I'm not the only one to have this problem : http://gallery.menalto.com/node/100032 |
|
albataur
Joined: 2011-01-04
Posts: 7 |
![]() |
No idea ? |
|
albataur
Joined: 2011-01-04
Posts: 7 |
![]() |
Ok I think I found why callback isn't called. { I'll try to found where I can correct it. |
|
albataur
Joined: 2011-01-04
Posts: 7 |
![]() |
I browsed almost every files for finding where is added this field ... unsuccessful. |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Ah, you're getting bitten by this: https://sourceforge.net/apps/trac/gallery/ticket/1316 |
|
albataur
Joined: 2011-01-04
Posts: 7 |
![]() |
Wow indeed, it was this ! Thank you ! Nevertheless, I tried to put this setting off in htaccess : php_value post_max_size 100M php_flag session.use_trans_sid Off </IfModule> But it didn't work (gallery is on a shared host). Any idea ? Finally I setted it in index.php
Anyway, thank you for your help ! |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
@albataur: I have committed your suggested fix to 3.0.1 -- thanks! |
|