Closed (fixed)
Project:
Examples for Developers
Version:
6.x-1.x-dev
Component:
Node Example
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2008 at 14:10 UTC
Updated:
20 Jun 2010 at 02:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
damien tournoud commented... and hook_validate() documentation says it should be
($node, &$form). That's a real mess.At this time, I'm not sure that modifying the node during validation is even supported.
Comment #2
jbrauer commentedThe documentation for hook_validate() in the node_example module is incorrect. As can be seen http://api.drupal.org/api/function/node_example_validate/7 As noted by earlier hook_validate() expects this to be called like this:
the node example module section on hook validate needs to be this:
The remainder of the text needs to be updated as well as the code sample.
Comment #3
jhodgdonThe example modules are now being maintained in a different project, so moving this issue there. It's possible this has already been fixed... in fact, I think it has, but the new examples are not yet up on api.drupal.org -- we need to have that happen soon!
Comment #4
rfayhook_validate() is not used in the current D7 version of the node example module, so closing.
Comment #5
jbrauer commentedAccording to CVS this is not fixed in the Drupal 6 branch.
Comment #6
rfayHere's the fix, 2 years later. However, I never found any trace of $node being passed by reference.
Comment #7
rfayCommitted: http://drupal.org/node/248919