Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
documentation
Priority:
Minor
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
8 Aug 2009 at 21:19 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
webchickSince this deals with API documentation, moving to the Drupal core queue.
It looks like D7 suffers from this as well, although the hooks have been renamed there to hook_node_update() and hook_node_insert().
Comment #2
jhodgdonThis is D6 only. There is no hook_nodeapi in Drupal 7, as the individual "ops" from Drupal 6 were moved into their own hooks.
Comment #3
webchickBut the descriptions in 7.x for hook_node_insert/update also use present-tense, rather than past-tense, so if they're confusing in 6.x, they're confusing in 7.x as well. We just moved those hooks around slightly in 7.x.
Comment #4
lyaunzbe commentedRan through the documentation in node.api.php in D7 and made certain descriptions/params past sense where it made sense.
Comment #5
lyaunzbe commentedComment #6
webchickThis is an improvement, but I think we could do better still.
The thing I think that the documentation currently is doing a poor job of explaining is that the operations happen in the following order, one right after another.
From node_save:
So the thing to communicate is that hook_node_X (or hook_nodeapi op X) happens *directly* after the node is saved (and, in D7, its fields updated). The current wording I feel is a little too wishy-washy and implies that this happens at some point after but not immediately after. So maybe change instances of "A node has been saved" to "A node has 'just' been saved" or something? Not sure.
Also, I didn't do an exhaustive review, but something that caught my eye:
Actually the old wording was correct. The operation is currently "being" performed. It's the things talking about the state of the node that need to be updated to past-tense.
21 days to code freeze. Better review yourself.
Comment #7
joachim commentedMarking http://drupal.org/node/332743 as a duplicate.
I think I filed something for this ages ago too.
Anyway, THANK YOU webchick!
Comment #8
lyaunzbe commentedRerolled after applying change of wording suggested by webchick.
Comment #9
joachim commentedNot all of these make sense in past tense:
This review is powered by Dreditor.
This one should stay as it is, surely? It hasn't been shown to the user yet, as we are able to modify what the user will see.
It's still being validated, as we have the power to fail the validation here.
It's not yet been displayed when we get here.
Beer-o-mania starts in 20 days! Don't drink and patch.
Comment #10
lyaunzbe commentedIt looks like someone got to this during my absence and finished the patch. Good work to whomever completed it! This issue should probably now be closed as it looks to be fixed.
Comment #12
joachim commentedLet's fix this on 6 too, otherwise this will continue to cause confusion.
Comment #13
jhodgdonI just updated the update/insert ops on hook_nodeapi() in D6 also.