Preview shows normally, but real post appears only when I refresh whole page!

CommentFileSizeAuthor
#10 Ajax Comment submit60.87 KBAnonymous (not verified)

Comments

bobdalob’s picture

Same here. In FF2, following preview, you need to edit the comment to be able to hit the post button (in fact the text in the comment form centres itself vertically until you edit it).

I also notice weird behaviour if you try to post or preview a second time. In FF & IE7 I get the page reloading itself within the div.

I really like it's potential.

nedjo’s picture

Thanks for noting the issue. I originally wrote ajaxsubmit as an API module for other modules to use. I added the ability to select forms to submit via AJAX, but I'm not sure the idea was a good one since special handling may be needed for certain forms and e.g. to support previews. For D6 the module should be rewritten from scratch in any case to use the jQuery forms plugin (now included in Drupal core).

So I don't know that I can address this bug before rewriting the module. That said, ideas or a patch would be welcome.

yngens’s picture

I am going to stay with 5.x for a while, but at the same time I would love to use ajax comment submit. I really hope some knowledgeable users can correct this issue.

yngens’s picture

i wonder if this ever will be fixed for 5.x or not?

pereljon’s picture

I'm trying to submit comments through jQuery Forms plugin using the ajaxSubmit without success... Any hints? The ajaxForm method also does not work... A regular submit of a form works... Is there something special about how comments are submitted that doesn't allow ajax to methods to work?

Anonymous’s picture

Anyone ever get this working?

TIA,
txcrew

bobdalob’s picture

Version: 5.x-0.8 » 5.x-1.1

Kind of, with the most recent release, and with comment editing disabled - otherwise things get a little weird.

Anonymous’s picture

...with comment editing disabled

I apologize for my ignorance, but how does one disable comment editing. I do not see it in comment settings or access control.

txcrew

bobdalob’s picture

Um, I think that was my red herring, sorry! I had previously hacked the comment module (pre-use of ajax submit) so that a user could edit their own comments for xxx seconds. So I have access control settings for "edit all comments" & "edit own comments" but normally there are not. Anyway both are disabled.

Comments form is on the same page as the node, subject field is disabled and so is the option to reply (another hack - commented out in comment.module).

Anyway, for the comment form I now find no problems using Ajax submit. I've tried Opera 9.5, FF3, IE7, Safari and Google Chrome - it works for preview and post comment.

Anonymous’s picture

StatusFileSize
new60.87 KB

I was able to apply the patch for the timed edits and permissions on the comments.

I have the same settings as you except for the hack for comment reply hack.

Now I have some strange thing happening that hasn't ever happened before with the ajax submit. When I submit a comment I get a screen that says 'An error occurred:' and shows my front page in what looks to be an iframe (see attached shot).

I assume this to be something simple that I missed some place.

Could you perhaps post your hacked comment.module?

TIA,
txcrew

bobdalob’s picture

Pls refer to private message

taqwa’s picture

I still have this issue with the latest release. Has this been resolved in the dev version?

bharanikumariyerphp’s picture

Hi,

I am also got same error,

You fixed that above Screen shot issue ,

Tell the solution please ,

djpumpkin’s picture

I've been trying to get this working also. Please share your solution!

bobdalob’s picture

Version: 5.x-1.1 » 5.x-1.2

Since I upgraded to v1.2, whatever limited solution I had working, stopped working, so I disabled it. Also, whilst still in v1.1 I noticed additional strange behaviour when # of comments exceeded limit for the page. Comment editing was not possible either.

It'd be really nice to have a solution for comments but I think it should become its own module with an option for ajax editing of comments and some nice countdown timer where a time limit is set.