Closed (fixed)
Project:
Weight
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2007 at 11:10 UTC
Updated:
9 Apr 2011 at 18:57 UTC
When entering a node that had a weight of 0, it becomes -20 when entering node edit mode.
The attached patch works for me, however, I am not sure about the other call to _real_sticky2weight().
| Comment | File | Size | Author |
|---|---|---|---|
| weight-5.x-1.x.patch | 657 bytes | yhager |
Comments
Comment #1
quicksketchThanks, works for me!
Comment #2
elv commentedGreat, works for me too. Just in time for a site I'm working on! Thanks.
Comment #3
stella commentedThis works for me too. Is there anyone actively working on this project?
Comment #4
Mojah commentedAll nodes created prior to installing node_weight will be set to -20 when edited. So this patch works for new nodes. Just remember to set old nodes to 0 or required weight when editing them.
Comment #5
pearcec commentedPatch works. Crucial. I updated the database for previous nodes to -100.
Comment #6
yhager commentedComment #7
treksler commentedhmm i had to use
also, any word on getting node weights added to core in a non hacky way?
Comment #8
andyschm commentedThis patch for a critical bug has been in queue for 4 months. Does this module have an active maintainer?
Comment #9
harry slaughtersounds like you didn't do the initial conversion of sticky field to weight conversion in admin/settings/weight/setup
Comment #10
harry slaughterfixed in weight 5.x-1.0
http://drupal.org/node/146436
Comment #11
rmpel commentedI had exactly the same problem as the people reporting it above
The solution is the conversion indeed.
Perhaps, for the dummies we are :P, this conversion should be done by an install function?
i have been thinking about this; you can safely convert every sticky 0 or 1 to -100 and 100 respectively providing the weight of nodes do not exceed 98
a non-sticky node with weight 100 would have weight 0
a sticky node with weight -99 would have weight 1
(that is, if I understood the function of the module correctly)
so if we never have stickies > 98 or < -98 the conversion of nodes can be done whenever one wants.
Ah well, just my thoughts on this issue.
Remon.
edit --
It looks I reinvented the wheel; i posted a bugreport 'some small bugs' implementing the same fixes as yhager's patch.
The latest development snapshot (which i downloaded today) did not have these fixes incorporated, so I uploaded the patch.
Also, the package liked to above does NOT fix all the bugs; the _real_sticky2weight function still needs if ($sticky) replaced by if ($sticky > 0) to be bugfree.
Comment #12
Issmt commentedDoes this module have an active maintainer?