Set weight to ? (Preview w/Quote module causes doubled text)

Heine - January 30, 2009 - 08:15
Project:Comment Upload
Version:6.x-1.0-alpha4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

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

#1

Heine - February 3, 2009 - 10:16
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.

<?php
  $build_form
= form_builder('comment_form', $copy_form, $state);
 
comment_upload_value_to_default($build_form, $form);
?>

#2

netaustin - February 4, 2009 - 02:14

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

#3

Heine - February 4, 2009 - 07:57

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.

#4

aharown07 - April 1, 2009 - 15:03

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.

#5

aharown07 - May 16, 2009 - 22:08
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?

#6

aharown07 - May 17, 2009 - 01:40

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.

#7

aharown07 - May 17, 2009 - 01:41
Category:task» bug report

#8

aharown07 - May 17, 2009 - 01:42
Title:Set weight to ?» Set weight to ? (Preview w/Quote module causes doubled text)

#9

epedder - October 2, 2009 - 03:21

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?

 
 

Drupal is a registered trademark of Dries Buytaert.