With the new AHAH code, weight 10 is no longer needed. Commit #167994 sets it back to 0.

Comments

heine’s picture

Title: Set weight to 0 » Set weight to ?
Status: Fixed » Active

Reactivating as the following code is still in, and needs to run _after_ other modules.

  $build_form = form_builder('comment_form', $copy_form, $state);
  comment_upload_value_to_default($build_form, $form);
netaustin’s picture

Setting the weight to 2 did the trick; that's what should be in the D6 branch.

heine’s picture

If the weight is 2, there's no guarantee that project_issue runs after comment_upload as the execution order would then depend on the alphabetical order of filepaths. That means that comment upload should have weight 1 or we should get rid of the code in #1.

aharown07’s picture

I've been directed here because using Quote module doubles the quote text when you click Preview if Comment Upload is enabled.... (#307009: comment_upload having weird behaviour with "quote" module ...) which I'm led to believe has something to do w/this issue here with weight.

What I don't know, though, is what does it have to do with weight, what weight are we talking about, and if there is some setting or code I need to change, where do I go to do that?
Thanks for any guidance.

Edit: Found it. Line 505 in comment_upload.module contains $file->weight = 0;
I changed this to $file->weight = 2; and this fixed the problem at my site.
What impact that might have on other modules I don't know.

aharown07’s picture

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

I'm having this problem again now and changing weight does not correct it. Ideas?

(When I comment out code in #1, problem goes away... but what's the impact on Comment Upload?)

Edit: I'm not seeing any impact (yet). Files attach just fine... and preview seems to work OK also. What is the code in #1 for?

aharown07’s picture

OK, I see the impact now. Removing that code basically breaks Preview anytime I don't use Quote.
So I don't have a workaround for this at present... maybe I'll just disable preview on my site.

aharown07’s picture

Category: task » bug
aharown07’s picture

Title: Set weight to ? » Set weight to ? (Preview w/Quote module causes doubled text)
epedder’s picture

I'm having the same problem. I also have advanced_forum installed and the Preview button does not actually display the preview (everything else is in place). As far as I can see the preview template is never used. I've tried changing the weight and removing the code in #1 but none of these steps help.

I have to choose between disabling comment_upload (6.x-1.0-alpha5) and disabling preview. What is the best way to disable the preview button?