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

CommentFileSizeAuthor
#2 page_title.module.patch_1.txt637 bytesAjK
page_title.module.patch_0.txt478 bytesAjK

Comments

robertdouglass’s picture

Status: Needs review » Fixed

commited to 4-7. thanks!

AjK’s picture

Status: Fixed » Needs review
StatusFileSize
new637 bytes

Robert,

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

robertdouglass’s picture

Well, 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!

robertdouglass’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)