I'm just posting the error i got from the demo page when i tried submiting the comment form without js enabled on firefox3:

The form directed me to http://drupaldance.com/comment/reply/846 after submitting it, and this is all i got as plain text:
{ "status": true, "data": { "errors": null, "message": "", "preview": "\x3ca id=\"comment-888\"\x3e\x3c/a\x3e\n\r\n\x3cdiv class=\"comment\"\x3e\r\n\x3cp class=\"LUsr\"\x3e\r\n \x3ca class=\"comment-anchor\" id=\"comment-51\" href=\"#comment-51\" title=\"\"\x3e#\x3c/a\x3e |\r\n \x3cstrong style=\"letter-spacing: -1px;\"\x3e\x3ca href=\"http://example.com\"\x3eанонимус\x3c/a\x3e\x3c/strong\x3e\r\n\r\n \x3c/p\x3e\r\n \r\n\r\n\x3cdiv class=\"LCon\"\x3e\x3cp\x3etesting witout js enabled\x3c/p\x3e\n\x3cdiv class=\"corntl\"\x3e\x3c/div\x3e\x3cdiv class=\"corntr\"\x3e\x3c/div\x3e\x3cdiv class=\"cornbl\"\x3e\x3c/div\x3e\x3cdiv class=\"cornbr\"\x3e\x3c/div\x3e\x3c/div\x3e\r\n \x3cdiv class=\"commentlinks\"\x3e\x3cul class=\"links\"\x3e\x3cli class=\"comment_reply first last\"\x3e\x3ca href=\"/comment/reply/846/888\"\x3eответить\x3c/a\x3e\x3c/li\x3e\n\x3c/ul\x3e\x3c/div\x3e\r\n\x3csmall class=\"LDat\"\x3e\r\n\x3ca href=\"#comment-51\" title=\"\"\x3eсегодня в \x3cstrong\x3e16:20\x3c/strong\x3e\x3c/a\x3e \x3c/small\x3e\r\n\x3c/div\x3e", "destination": "ajax_comments?r888#comment-888" } }

The comment didn't get through.
Seems to me the comment form is not working without JS enabled, which is a major issue :S

I chose the 6.x-1.4 version, but I'm not sure what version you are running on the demo page, whatever it is at the time that I am posting this issue.

Other than this, I think it's a great initiative, and is already a great step towards what we all would be very happy with in our sites. Thanks for this! - let me know if you need more testing on this issue.

CommentFileSizeAuthor
#13 fix_preview_notice-349130-13.patch479 bytesryandekker

Comments

manuel garcia’s picture

I have just tested this on a local d6 install, with garland as theme, got the same result.

{ "status": true, "data": { "errors": null, "message": "", "preview": "\x3ca id=\"new\"\x3e\x3c/a\x3e\n\x3ca id=\"comment-\"\x3e\x3c/a\x3e\n\x3cdiv class=\"comment comment-new comment-preview odd\"\x3e\n\n \x3cdiv class=\"clear-block\"\x3e\n \x3cspan class=\"submitted\"\x3eFri, 12/19/2008 - 17:21 — \x3ca href=\"/user/1\" title=\"View user profile.\"\x3emanuel\x3c/a\x3e\x3c/span\x3e\n \n \x3cspan class=\"new\"\x3ePreview\x3c/span\x3e\n \n \n \x3ch3\x3e\x3ca href=\"/comment/reply/356#comment-\" class=\"active\"\x3etestest\x3c/a\x3e\x3c/h3\x3e\n\n \x3cdiv class=\"content\"\x3e\n \x3cp\x3etesttest\x3c/p\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n\n \x3c/div\x3e\n", "submit": "\x3cinput type=\"submit\" name=\"op\" id=\"edit-submit\" value=\"Save\" class=\"form-submit\" /\x3e\n", "destination": "", "captcha": null } }

manuel garcia’s picture

neochief’s picture

Thanks for report. Yes, I can confirm this issue. Will try to fix asap.

Ne01eX@drupal.ru’s picture

Ага, не работает без JS:

{ "status": true, "data": { "errors": null, "message": "", "preview": "\x3ca id=\"comment-\"\x3e\x3c/a\x3e\n\r\n\x3cdiv class=\"comment\"\x3e\r\n\x3cp class=\"LUsr\"\x3e\r\n \x3cstrong style=\"letter-spacing: -1px;\"\x3eпредпросмотр\x3c/strong\x3e\r\n \x3c/p\x3e\r\n \r\n\r\n\x3cdiv class=\"LCon\"\x3e\x3cp\x3eС выключенным JS..\x3c/p\x3e\n\x3cdiv class=\"corntl\"\x3e\x3c/div\x3e\x3cdiv class=\"corntr\"\x3e\x3c/div\x3e\x3cdiv class=\"cornbl\"\x3e\x3c/div\x3e\x3cdiv class=\"cornbr\"\x3e\x3c/div\x3e\x3c/div\x3e\r\n\x3csmall class=\"LDat\"\x3e\r\n\x3ca href=\"#comment-1\" title=\"\"\x3eсегодня в \x3cstrong\x3e10:25\x3c/strong\x3e\x3c/a\x3e \x3c/small\x3e\r\n\x3c/div\x3e", "submit": "\x3cbutton type=\"submit\" name=\"op\" id=\"edit-submit\" value=\"Сохранить\" class=\"form-submit\" \x3eСохранить\x3c/button\x3e\n", "destination": "", "captcha": null } }

Еще, кстати, при отключенном JS ругается на капчу если я нажал предпросмотр, а потом в FF нажал "Назад". Может не выстебываться и организовать проверку, - если у юзера нет JS, то нихрена не делаем и выдаем стандартную форму comment.tpl.php, иначе блаблабла?...

neochief’s picture

Status: Active » Fixed

Fixed in HEAD. Will be released with 1.6

manuel garcia’s picture

Thanks neochief, looking foward to it :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

mr.alinaki’s picture

Have the same issue with latest -dev version. Without ajax-comments module all works well.

walker2238’s picture

Version: 6.x-1.4 » 7.x-1.x-dev
Status: Closed (fixed) » Active

This seems to be an issue in the D7 dev version.

acouch’s picture

Assigned: Unassigned » acouch

Thanks for reporting this. I've noted it as a full release blocker. Assigning to myself, but feel free to send a patch if you get to it first.

jwilson3’s picture

I've just tried the latest snapshot of 7.x-1.x-dev and am not getting any issue saving a comment with js disabled.

However, I do get the following warnings after submitting as a "preview":

Notice: Undefined property: stdClass::$thread in ajax_comments_entity_prepare_view() (line 400 of  .../ajax_comments/ajax_comments.module).
acouch’s picture

Title: Comments broken if JS disabled » Comment preview broken if JS disabled

Updating name. Will accept patches when posted.

ryandekker’s picture

Status: Active » Needs review
StatusFileSize
new479 bytes

Looks like $entity->thread isn't defined for previews. Here's a patch that does a check to make sure it's there or sets $depth to 0.

igorik’s picture

anybody who can confirm if it works? so is this still full release blocker?

muschpusch’s picture

Status: Needs review » Fixed

Thanks! Closing this and also committed the path for removing the notice.

muschpusch’s picture

Status: Fixed » Closed (fixed)