After setting a "page title" it's never retrieved at future edits as the node isn't loaded before rendering the form alteration array.
Patch attached to fix (just added the node_load() call)
regards
--AjK
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | page_title.module.patch_1.txt | 637 bytes | ajk |
| page_title.module.patch_0.txt | 478 bytes | ajk |
Comments
Comment #1
robertdouglass commentedcommited to 4-7. thanks!
Comment #2
ajk commentedRobert,
Sorry for re-opening this fix but something occured to me. My fix made a call to load_node(). This is somewhat expensive (loading an entire node just to get one value, namely the page_title var) given that the node has already been loaded.
With my fix in place, the node is loaded twice and therefore may well have a major performance hit on busy sites.
I have attached a patch that correctly gets the page_title default value without having to reload the entire node again thus removing all the second unneeded database work and calls to all hook_nodeapi() functions that exist.
Again, sorry for not thinking this fix/patch through more carefully.
The above patch was made against cvs 1.1.4.5
Regards
AjK
Comment #3
robertdouglass commentedWell, you don't have to worry about the node_load because it is statically cached anyway. Despite that, your second patch looks better, so I'll apply it. Thanks for your work on the module!
Comment #4
robertdouglass commentedComment #5
(not verified) commented