Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By noah on
I'm looking for a way to add weight to nodes in 4.6.3. I'd like to be able to use weight to determine the order in which stories appear. Currently they appear in the order in which they were created.
I've found a module that purports to do this. It's called weight.module, and it's here:
But it's looking for the function node_get_types(), which doesn't exist in 4.6.3.
Any ideas?
Thanks,
Noah
Comments
The function
The function node_get_types() seems to be called twice in the module. And it also appears that this function should return an array of node types. Drupal's node_list() function in the node.module file provides this functionality.
So I am wondering if switching out the unknown node_get_types() function with the node_list() function might help you out.
EDIT
Not but a few minutes after posting this comment I was reading a post on some of the new stuff coming with 4.7 and the changes that will need to be made to 4.6 modules. In the post Converting 4.6 modules to HEAD there is a note about the function node_list() in 4.6 becoming node_get_types() in 4.7.
So I'm guessing the weight module was create against HEAD, so you might just want to wait a short time until 4.7 is released.
4.7
Thanks rjl.
It's a commercial project for a client, so I'm not sure if I can hold out for 4.7. I'll see what I can do, though.