Weight only on selected content types
samuelsov - March 24, 2009 - 19:19
| Project: | Weight |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Here is a patch to compute weight only on nodes that we want weight on it.
Without this, I have problem with advanced forum where the sticky value is not computed and is still 100 or -100. I don't know exactly why. Maybe the sticky value is fetched with a query instead of using a node_load.
Anyway, i don't think it's necessary to compute the weight for every content type.
| Attachment | Size |
|---|---|
| weight.patch | 1.83 KB |

#1
I had a similar problem:
Enabled weight and turned it on for a few content types. Blog content type, which was not weight-enabled, was still affected for new posts. New posts got a sticky of -100 in the db, which caused them to go to the end of the list on the default blog module listings.
Patch works and looks good to me.
#2
Committed. Thank you for the patch and the test.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.