I have file field with non-limited values count in the comment. Problem is that when I've uploaded some file using ajax, form won't be rebuilt after submit.
I've investigated into problem, found line in ajax_comments.module (in my patched version it is line 289):
$commands[] = ajax_command_replace('#' . $form['#id'], $new_form_output);
If I don't upload file, $form['#id'] is 'comment-form', and form is rebuilt correctly. When I upload file, $form['#id'] is 'comment-form--2' but when I look into HTML, id of the form is still 'comment-form'. That is why rebuilding doesn't work - we try to rebuild non-existing form.
As a solution we can try to rebuild form using it's '#form_id', but I'm not sure that it is true way.
Is there any ideas how to fix? Can somebody reproduce this bug?

Comments

formatC'vt’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

Try latest dev, please

formatC'vt’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)