[documentation] [Documentation bug] hook_validate documentation claims to use modifications to the passed $node parameter
plumbley
drupal-docs at drupal.org
Sat Dec 16 21:24:41 UTC 2006
Issue status update for
http://drupal.org/node/101930
Post a follow up:
http://drupal.org/project/comments/add/101930
Project: Documentation
Version: <none>
Component: Misc
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: Wesley Tanaka
Updated by: plumbley
-Status: active
+Status: patch (code needs review)
Attachment: http://drupal.org/files/issues/node.php_1.patch (1.35 KB)
+1 for this fix (remains in HEAD documentation). Combined with an out of
date node_example.module, I think this has been confusing quite a few
people for a while.
Patch for HEAD attached. Please also apply to 4.7, since it is wrong
there too.
Best wishes,
Mark.
plumbley
Previous comments:
------------------------------------------------------------------------
Thu, 07 Dec 2006 14:08:15 +0000 : Wesley Tanaka
http://api.drupal.org/api/4.7/function/hook_validate says:
"
It can also be used to make changes to the node before submission, such
as node-type-specific formatting.
"
Both my recollection and an attempt to do that just now are contrary to
that claim.
------------------------------------------------------------------------
Thu, 07 Dec 2006 14:13:07 +0000 : Wesley Tanaka
Ah yes, hook_submit does exist (I didn't see it the first time in the
list). I'd suggest:
1. changing the hook_validate documentation so that the $node parameter
is no longer preceded with '&'
2. removing the claim that it's possible to make changes to the node
3. adding a reference to hook_submit for people that want to make
changes to a node.
More information about the documentation
mailing list