1) hook_load should return only additions to node

2) in faq_load no check about result
if nothing is loaded there's notice and lost title of node

here the patch

CommentFileSizeAuthor
faq_load.patch751 bytesandypost

Comments

stella’s picture

Why are you removing the line:

$node->question = $result->question;
andypost’s picture

Because
1) if $result is FALSE $node->title sets to empty value - title become empty on save
2) hook_load returns only additions that merge into node - no need to modify $node object
3) return of $result with only 2 fields (question and new title) is more quick on merge which happens after

please, take a closer look to http://api.drupal.org/api/function/hook_load

stella’s picture

Status: Needs review » Fixed

Committed, thanks! Will be included in the next release. Back-ported to Drupal 5 as well.

Cheers,
Stella

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

stella’s picture

Released in 5.x-2.12 and 6.x-1.8.