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
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.

AttachmentSize
weight.patch1.83 KB

#1

Jody Lynn - April 9, 2009 - 14:41
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

NancyDru - April 25, 2009 - 15:12
Status:reviewed & tested by the community» fixed

Committed. Thank you for the patch and the test.

#3

System Message - May 9, 2009 - 15:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.