When viewing FAQ pages by category, the following error is displayed:
Notice: Undefined variable: answer_label in include() (line 164 of /path/to/docroot/sites/all/modules/contrib/faq/includes/faq-category-questions-top.tpl.php).
On line 164 of 'faq/includes/faq-category-questions-top.tpl.php)' is the following line of code:
<strong><?php print $answer_label; ?></strong>
There is no '$answer_label' var available in the template, defined in the module, or even an 'answer label' form field option in the admin UI.
Removing or commenting out this line (in the HTML and PHP) resolves the issue.
Note: this needs to be corrected in the module includes directory. Overriding the .tpl.php file will not correct the error, since the original file is still being processed and will throw the error at that point.
Comments
Comment #0.0
davmorr commentedtypo
Comment #0.1
davmorr commentedCorrection, removed .tpl.php relocation to theme dir for correction recommendation because it didn't work, added a note advising as much.
Comment #1
Steven Brown commentedThe root of the issue is in the template_preprocess_faq_category_questions_top() function in the faq.questions_top.inc file.
First off we need to figure out if we need the answer_label or if that needs to be a different label. I haven't had time to actually test your issue but did see that in the function mentioned above the variable never gets defined.
Comment #2
Steven Brown commentedThe following patch fixes the issue.
Comment #3
Steven Brown commentedPatch has been tested and committed. http://drupalcode.org/project/faq.git/commit/5ab4bfc