Download & Extend

Weight only on selected content types

Project:Weight
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

AttachmentSize
weight.patch1.83 KB

Comments

#1

Status:active» reviewed & tested by the community

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

Status:reviewed & tested by the community» fixed

Committed. Thank you for the patch and the test.

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.