Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Feb 2006 at 23:01 UTC
Updated:
5 Apr 2010 at 12:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
drewish commentedthat patch no longer applies. i'll re-roll it though, i'd really like to get this in before the code freeze.
Comment #2
magico commentedThis should have been marked as "needs review", or else no one will ever look at it!
Comment #3
drewish commentedwhoops, yeah that would have been helpful. oh well, it totally missed the code freeze.
Comment #4
magico commentedIt seems a simple patch to me. You could re-role it to HEAD and being important (as I think it is) it may get some attention from senior developers.
Comment #5
coreb commentedMoving out of the "x.y.z" queue to a real queue.
Comment #6
coreb commentedI incorrectly used the new "patch (to be ported)" status.
Comment #7
pwolanin commentedThis should certainly be implemented - re-roll for HEAD, and I'd give it a big +1
Comment #8
drewish commentedHere's a re-roll for HEAD, the book module now does everything through hook_nodeapi so I won't change it.
Comment #9
moshe weitzman commentedIs the intent here just to achieve better symmetry with the hook_insert/update/delete or does some module actually need this new hook as opposed to using nodeapi? if the latter, i suggest we add a hook when a need arises, and not earlier. not a big deal though.
Comment #10
drewish commentedmoshe, it's both that and just making it obvious to developers how to support revisions. when i originally updated the example node module to support revisions it wasn't obvious to me why i needed to implement hook_nodeapi just for revisions. in my opinion a module should need to implement hook_nodeapi to do anything with its own nodes.
Comment #11
pwolanin commentedpatch applies with offset, seems to work and is a rational addition.
Comment #12
drewish commentedhere's a re-roll that applies cleanly.
Comment #13
ChrisKennedy commentedStill applies.
Comment #14
dries commentedI think we need to motivate this patch better. Why is this so important?
Comment #15
drewish commentedDries, i don't know what more i can say that i haven't already said so i'll just summarize.
if you believe that modules should support revisions for nodes then it seems like you'd want to make that as easy as possible. it seems very counter intuitive that to correctly implement revision a module needs to implement hook_nodeapi. in my opinion a module should be able to do so by implementing hook_delete_revision rather than implementing hook_nodeapi to work with it's own nodes.
we've lived for two release without it so it's obviously not critical, but if we really care so much about having clean APIs, it would seem like we could clean up the warts in the ones we've got. if you don't think it's a worthwhile change feel free to mark it as won't fix.
Comment #16
catchI'd like to see this go in, but it no longer applies.
Comment #17
preventingchaos commentedThis is essential to the consistency and maturity of the API. It will eliminate any confusion when creating node modules that deal with revisions, and increased consistency will give more credibility and an increased appearance of professionalism to Drupal as a whole. Developers will no longer have to use hook_nodeapi as the workaround for this bug, resulting in code that makes a little more sense, more respect for Drupal from prospective developers, and possibly more adopters and people joining the community.
Comment #18
casey commentedhttp://api.drupal.org/api/function/hook_node_revision_delete/7