Weight error during installation:Failed opening required 'sites/default/modules/webmail_plus/webmail_plus.fix_weight.inc
| Project: | Webmail Plus |
| Version: | 6.x-1.16 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | error, file, file_attach, webmail, weight |
Jump to:
During installation of webmail module I am getting the error :"The weights of modules file and file_attach are incorrect for Webmail Plus configuration. Webmail Plus needs to have a weight less than File but greater than File Attach. You can fix it by hand or using this experimental feature."
But on clicking on the "experimental feature" link another error comes : "Fatal error: require_once() [function.require]: Failed opening required 'sites/default/modules/webmail_plus/webmail_plus.fix_weight.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/visvas/public_html/eboard/includes/menu.inc on line 346 "
Does it related to post :http://drupal.org/node/428944
any ideas?
what this error is ? and how i could i fix it?

#1
#2
I had the same issue and found out, that the logic in webmail_plus is misleading.
if($file_weight->weight=$file_attach_weight->weight || $file_weight->weight>$file_attach_weight->weight) {
should read like
if($file_weight->weight<=$file_attach_weight->weight+1) {
The next error is
db_query("UPDATE {system} SET weight = -5 WHERE name = 'webmail_plus' AND type = 'module'");
This should be like
db_query("UPDATE {system} SET weight = %d WHERE name = 'webmail_plus' AND type = 'module'",
($file_weight +$file_attach_weight->weight) / 2 );
or something like that (ensure, that no integer overflow will occure).
I set the weight of webmail_plus to 5 is that OK?
#3
I have exactly the same problem as described in the first post (the same version, the same behaviour) and no idea what to do... Thanks in advance for help.
#4
Excellent fix, I am going to add this to the next release for sure!
#5
And when will the next release be?
Grizz
#6
The first fix listed above (#2) has been implemented; the second one has not (as of 6.x-1.x-dev) 2009-Oct-03. The addition of the second change fixes this issue!
-B