I installed the latest faq module, version 5.x-2.7 this morning and all the questions and answers disappeared. The answers could be seen in the html source, but the questions were not present so there was nothing to click on, so I did a hasty backtrack to 5.x-2.6 ;-(

The new table is present and the inserts are correct.
I'm using the hide_answers layout method, taxonomy is enabled but not used for faq.module.
I have revisions enabled for faq type node.

This evening I decided to have another look, on my dev copy of the production site and I think I have identified the problem:
$node->question on line 1332 was not loading up, I traced this back to the function faq_load on line 253 which was not working.
The parameter to faq_load was not being passed by reference and the SQL was not linking to 'vid'

I have attached a patch that fixes these two issues.

Thanks for a nice module BTW.
HTH

CommentFileSizeAuthor
#4 faq.module-faq_load.2.patch525 byteshutch
faq.module-faq_load.patch545 byteshutch

Comments

stella’s picture

Status: Active » Fixed

Hi hutch,

Thanks for the patch. I've added in the vid 'where' clause to the SQL query. However, the $node parameter should not be passed in by reference. See the API documentation, so instead the faq_load() function now returns the $node object.

This has been added to CVS and will be available in the next dev release (available later today).

Cheers,
Stella

hutch’s picture

I should have checked the docs!
removed the ampersand and added
return($node);

works a treat.

stella’s picture

Priority: Normal » Critical

I think this probably critical enough for me to make another release.

hutch’s picture

StatusFileSize
new525 bytes

I agree, here is another patch with Stella's changes, on version 5.x-2.7

stella’s picture

Released in FAQ 5.x-2.8 and FAQ 6.x-1.4.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

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