Please see 3 screenshots.

1. One image is attached to the comment.
2. It just previewing. So, you should see an image attached to the 1st post.
3. It just submitted the comment. Then, an image was lost.

Comments

arhak’s picture

please, save me some time, run the same test without comment_driven (be aware that you might have to disable every driven property for that content type or the whole module, since it was recently that I activated the "Enable driven properties" checkbox, which was being ignored)

arhak’s picture

the rationale for #1 is not wasting your time instead of mine, there are several modules with "previewing bugs", comment_driven has known bugs regarding previewing and AHAH, but even core's taxonomy has bug when previewing, so please, lets discard if it is a comment_upload issue or ours

arhak’s picture

Title: Not working with comment_upload » comment_upload brakes on preview
arhak’s picture

Title: comment_upload brakes on preview » comment_upload breaks on preview

typo

Takafumi’s picture

When turned off "Enable driven properties"

1. One image is attached to the comment.
2. It just previewing. So, you should see an image attached to the comment.
3. It just submitted the comment. Then, an image is attached to the comment.

arhak’s picture

then it works taking comment_driven out of the way

arhak’s picture

wait a second,
with driven enabled you're getting the attachment previewed in the node_form!

tricky scenario

arhak’s picture

comment_upload mimics (actually duplicates a lot of code from) core's upload module, which makes it too hard to avoid collision between the node_form and the comment_form (remember they are both mixed when driven comes in)

I'm glad that a minor change introduced comment_upload support
BUT having preview support for comment_upload seems to be too much to ask

nevertheless, I'll try to make it the other way around, attempt to make comment_upload to be aware of comment_driven and then you might test and request them support (if I make it possible)

moreover, there are several issues that makes me feel that investing time for comment_upload won't worth it:

Time to say bye bye to http://drupal.org/project/comment_upload and friends.

* this is the opening of a D7 issue #504666: Make comments fieldable
* comment_upload is in beta stage yet
* last commit was "34 weeks ago"
* they have issues blocking their first 6.x-1.0 release http://drupal.org/project/issues/search/comment_upload?issue_tags=6.x-1....
* e.g. #397616: non-admin users can't add comments to issues if previewing is required
* and they also have preview issues, e.g. #666680: Preview of comment not showing

arhak’s picture

BTW, I forgot to mention how scary is to debug comment_upload

  ...
    // Rape the comment form.
    // Comment_form was not build to rebuild a form and fetch values from $form_state.
    // To preserve changes made by the user, we build the part of the form we just received,
    // mapping $_POST values to #default_values.
    // Because rebuild is TRUE, $_POST has been validated. Nevertheless this is insane.

    $copy_form = $form;
    $copy_form['#post'] = $_POST;
    unset($copy_form['#post']['op']);
    unset($copy_form['#after_build']);

    $build_form = form_builder('comment_form', $copy_form, $state);
    comment_upload_value_to_default($build_form, $form);

    form_clean_id(NULL, TRUE);
  ...
  // Comment_form dynamically adds buttons such as preview / save in the
  // formbuilder. As the attachment fieldset contains an AHAH element, the
  // #cache property of the form will be set to TRUE and the formbuilder will
  // no longer be called. Therefore, comment_upload needs to implement preview
  // functionality as well.
  ...
arhak’s picture

Status: Active » Closed (won't fix)

I'm deeply sorry, but it would be easier to make a third version of core's upload module to support comment_driven without collision between the node_form and comment_form
otherwise a cleaner version of comment_upload would be required,
can't use same variable names neither hunt them all over the place to differentiate the cases

obrienmd’s picture

If I disable comment preview, will comment_upload still work? Until we move to D7, comment_upload will be an important part of my company's projects, and we'd like to use comment_driven widely. In cases where we'll be using comment_driven, we can disable preview if this would make it work (preview is rarely/never used)...

arhak’s picture

Version: 6.x-1.x-dev » 6.x-1.0-unstable5

you got two seconds late!
I just released unstable6

yes, it is possible, I can even provide a checkbox to remove the preview button in exchange for comment_upload support

please, copy and paste your request over here #739690: Compatibility with comment_upload
also re-open that issue

arhak’s picture

and yes, preview is rarely used, there are tons of modules with bugs on preview
not just core's taxonomy, also drupal.org site has bugs on this when using "preview difference" (I think it is a feature provided by diff module)

arhak’s picture

most likely this will end up being a "won't fix"
UNLESS comment_upload maintainers get involved

nevertheless, this is the closest I could get so you can tried
the expected effect would be comment_upload not breaking on preview
but preview renders useless, as if it wasn't an actual preview, just a dummy submission step

this requires patch at #739690-12: Compatibility with comment_upload

EDIT: point to the right patch

arhak’s picture

Version: 6.x-1.0-unstable5 » 6.x-1.0-unstable6
Status: Closed (won't fix) » Needs review
StatusFileSize
new1.64 KB

forgot the attachment

arhak’s picture

Status: Needs review » Closed (won't fix)

this depends on the outcome from #739690-16: Compatibility with comment_upload
but even if that one is fixed there are great chances to keep this unsupported