I am experiencing a few errors when trying to use ajax_comments where my comment bundle has a file field.

1. when posting a root comment (not a reply to a comment), the rendered comment has a broken image in it. I need to refresh the page to get the image to show up.

2. when replying to the comment, the file field's ajax preview shows up on the main comment form, not the reply to comment form. and the image is not saved with the reply.

any suggestions?

Comments

muschpusch’s picture

marking this one as major and putting it on project page as release blocker

formatC'vt’s picture

Assigned:Unassigned» formatC'vt
Status:Active» Needs work

Bug confirmed.

formatC'vt’s picture

Status:Needs work» Needs review
StatusFileSize
new1.54 KB

Fixed (Removed regeneration ID for comment form and added comment_load()).

muschpusch’s picture

Hey, i'm on vacation and just had a look at your code.... Are you sure the first part doesn't break the views integration?

formatC'vt’s picture

if you talk about commenting code, yes, i'm sure, because $view_mode not used anywhere in ajax_comments_form_comment_form_alter().

muschpusch’s picture

muschpusch’s picture

Status:Needs review» Fixed

Status:Fixed» Closed (fixed)

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

formatC'vt’s picture

Status:Closed (fixed)» Active

reopen, bug with image field come back =(

formatC'vt’s picture

Status:Active» Needs work

Hm, bug is a little different (only with preview and attached files are saves).

    Notice: Undefined property: stdClass::$uri in function theme_file_link() (line 737 в файле /var/www/modules/file/file.module).
    Notice: Undefined property: stdClass::$filemime in function theme_file_icon() (line 775 в файле /var/www/modules/file/file.module).
    Notice: Undefined property: stdClass::$filemime in function file_icon_path() (line 819 в файле /var/www/modules/file/file.module).
    Notice: Undefined property: stdClass::$filemime in function file_icon_map() (line 862 в файле /var/www/modules/file/file.module).
    Notice: Undefined property: stdClass::$filemime in function file_icon_path() (line 834 в файле /var/www/modules/file/file.module).
    Notice: Undefined property: stdClass::$filemime in function file_icon_path() (line 834 в файле /var/www/modules/file/file.module).
    Notice: Undefined property: stdClass::$filemime in function file_icon_path() (line 834 в файле /var/www/modules/file/file.module).
    Notice: Undefined property: stdClass::$filemime in function file_icon_path() (line 834 в файле /var/www/modules/file/file.module).
    Notice: Undefined property: stdClass::$filemime in function theme_file_link() (line 744 в файле /var/www/modules/file/file.module).
    Notice: Undefined property: stdClass::$filesize in function theme_file_link() (line 744 в файле /var/www/modules/file/file.module).
    Notice: Undefined property: stdClass::$filename in function theme_file_link() (line 750 в файле /var/www/modules/file/file.module).

But any way needs work.

formatC'vt’s picture

Status:Needs work» Postponed

yep, this bug on drupal core side. This bug exist on clean drupal install also. it's are easy to reproduce:
1) Install drupal (without any contrib module)
2) add image field to comment
3) upload an image to comment and click 'preview'
4) Home » Administration » Reports
Notice: Undefined index: uri in theme_image_formatter() (line 602 of /home/s800caa97026f0d7/www/modules/image/image.field.inc).

formatC'vt’s picture