Closed (fixed)
Project:
Documentation
Component:
Developer Guide
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Feb 2006 at 23:47 UTC
Updated:
21 Feb 2007 at 21:00 UTC
Please add documentation about hook_prepare called
with $op = 'prepare'
Thanks,
Fabio
Comments
Comment #1
dman commentedSeconded!
I found it mentioned over in the upgrade overview and it seems that as op=validate doesn't take modifications anymore that "prepare" must be where I'm supposed to do that. ... but it doesn't.
The HEAD docs still have the old version. (this is why I hate putting docs in different places than the code, although I know it's neccessary sometimes)
node.module has
... which is not what I'm looking for at all (I thought).
I'm updating htmltidy.module, and I used to be able to correct users markup on-the-fly as they previewed it. (by validating and fixing the HTML on 'validate')
Do I have to to that in op=form now (feels wrong) or what?
.dan.
Comment #2
dman commentedJust some notes (maybe off-topic)
Currently the 4.7 node.module
node_form()function does NOT trigger a moduleshook_nodeapi($op='form'...)like it used to with $op='form pre'.node_validate() for example, passes on to
node_invoke_nodeapi($node, 'validate');... which is to say, it allows any modules to validate the node.
Likewise, most of the $ops normally sprung by hook_node_api()
"prepare", "validate", "submit", "load" and "view" do anyway. But NOT "form".
I believe this is because of the new form_alter() method. I take it modules are supposed to use that to do things they used to do in hook_nodeapi($op='form pre') etc.
... but modifying fields there still doesn't reflect the changes on preview. ... still hunting through the code.
Comment #3
Zen commenteddrupaldocs is being "moved". In the meantime, you can use a mirror and thank merlinofchaos for it :)
-K
Comment #4
webchickFYI, anyone with CVS access can update this documentation.
It's found in contributions/docs/developer/hooks/core.php
Comment #5
pnm commentedWas this resolved in webchick's patch for http://drupal.org/node/109754 ?
Comment #6
Tresler commentedIt is listed on api.drupal.org now.
Comment #7
Tresler commentedTracking in case re-opened
Comment #8
Tresler commentedComment #9
(not verified) commented