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.
The hook_nodequeue_delete() which has been introduced in the current 7.x-2.x branch, is currently providing a queue ID to any implementations, AFTER all queue data has been deleted from the database.
This means that modules implementing the hook, does not have any information about the queue unless they are storing the data themselves.
A proper way would be to provide a nodequeue object to the hook.This is also the standard drupal way, as seen in hook_node_delete() for instance. http://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook...
Comment | File | Size | Author |
---|---|---|---|
#2 | nodequeue-delete_hook_should_provide_object-1978764-2.patch | 663 bytes | esbenvb |
#1 | nodequeue-delete_hook_should_provide_object-1978764-1.patch | 0 bytes | esbenvb |
Comments
Comment #1
esbenvb CreditAttribution: esbenvb commentedThis patches fixes the issue.
IMPORTANT! When porting this patch, make sure that the correct GIT attribution is used, as mentioned on http://drupal.org/user/989064
Comment #2
esbenvb CreditAttribution: esbenvb commentedSorry, wrong file content. THIS patch it is...
Comment #3
othermachines CreditAttribution: othermachines commentedI think you're probably correct that this is a better way, but this will break modules already implementing
hook_nodequeue_delete()
, including smartqueue.module. I wonder if it might be better to introduce the object as an additional (optional) argument.Comment #5
fizk CreditAttribution: fizk commented@othermachines, good call. The new hook is now
module_invoke_all('nodequeue_delete', $qid, $queue);