When creating a new node, the exclude node title checkbox is ignored. You have to edit the existing node to set it.
The reason is: the module handles this checkbox in the hook_form_submit procedure BEFORE the node is created. As a consequence, the needed node nid does not exist yet.
Please find an attached patch that moves the checkbox handling into the _nodeapi procedure which is being called after the node has been created/updated. It also removes nid from the exclude title node list when a node is being deleted.
This patch also recheck permission at submit time to avoid a forged request bypassing the authorization check.
Comment | File | Size | Author |
---|---|---|---|
drupal-exclude_node_title-6.x-1.7-insert.patch | 4.63 KB | monnerat |
Comments
Comment #1
gabrielu CreditAttribution: gabrielu commentedThanks, patch commited to DEV branch.
Let me know,
Gabriel
Comment #2
monnerat CreditAttribution: monnerat commentedThanks for having applied my patch.
But the rework you performed on the current git version fails for node deletion.
"case 'delete':" code should be reworked as you did for insert/update.
I've also noted you ported this patch to the 7.x version: 'delete' case is also left out there.
Comment #3
gabrielu CreditAttribution: gabrielu commentedCorrect, thanks for noticing.
Updates commited now.
Gabriel
Comment #4
monnerat CreditAttribution: monnerat commentedMmm, I would'nt check flag presence and permission on 7.x deletion: the node disappears so its nid should be removed from our list in all cases...
Comment #5
gabrielu CreditAttribution: gabrielu commentedI couldn't agree more with you :)
Update pushed to DEV
Gabriel
Comment #6
gabrielu CreditAttribution: gabrielu commentedFixed