Active
Project:
Frequently Asked Questions
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jan 2011 at 21:20 UTC
Updated:
20 Aug 2014 at 07:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rond49 commentedsame here, on a newly installed D7 under Acquia Drupal Stack.
Comment #2
gmendala commentedSame here. New D7 installation, same problem.
Comment #3
d.olaresko commentedThis error message shows only when option "Show node links" not checked. In this case data array have no 'links' key.
Little patch attached that fix this for me.
Comment #4
sliveroix commentedHi, how do i put the patch?
how to i find the "show node links"
Comment #5
d.olaresko commentedApplying patches:
http://drupal.org/patch/apply
"show node links" can find at module configuration page:
http:///admin/config/content/faq/questions
Comment #6
pmorel commentedI had the same notice and the patch worked for me.
Comment #7
recidive commentedHere's another way for fixing this notice that's inline to how it's done in faq-questions-inline.tpl.php.
Comment #8
d.olaresko commentedIt`s not so good solution coz you only fix problem in one tpl file but links can be shown with other tpl`s so it will cause notice again.
Comment #9
recidive commented"It`s not so good solution coz you only fix problem in one tpl file but links can be shown with other tpl`s so it will cause notice again."
The only tpl file that's missing the isset() check for links is faq-questions-top.tpl.php.
Comment #10
skilip commentedI applied the patch provided in #3 but found another (minor) flaw in the current setup. If you disable 'Show node links', the 'Back to top' links are disabled as well. This patch does remove the error discussed here and brings some more logic in the link generation.
Comment #11
recidive commentedHey guys, any chance we can get this one liner committed?
Comment #12
mstrelan commented+1 on #10 - RTBC
Comment #13
flightrisk commentedIs there an easier way to apply a patch? Is this built into a release yet anywhere where I can download and upgrade? I'm really having trouble with Drupal. I'm a coder in Delphi and Visual Studio, I use a version control system (not GIT). I thought Drupal was a simple, easy to use solution like Dreamweaver or Frontpage to create websites. I'm surprised to find that for all but the simplest of sites, you need to be a programmer and have web design be your full time job to be able to use and understand Drupal and all its modules. Seriously, using Git to have to patch builds instead of just downloading an upgrade or having an EXE patch program?
I've been at this a few days now and am thinking it would take a few weeks or months to learn Drupal enough to do what I need to do. I'm afraid to drop back and punt and do it in Visual Studio because then I would have to find a forum control and a few other things there and I would be in the same situation. Thanks.
Comment #14
flightrisk commentedI manually changed the lines in your patch file, so perhaps that is the problem, but now I get this error:
"Notice: Undefined index: faq_back_to_top in faq_view_answer() (line 1320 of C:\wamp\www\drupal2\sites\all\modules\faq\faq.module)."
When the following options are selected in configuration:
Clicking on a question opens/hides answer under the question
Display longer text
Allow long question text to be configured
show expand /collaps all links for collapsed questions
show node links <- this seems to be the problem
The "back to top" text is grayed out and I can't change it, perhaps that is related
Here is the code from line 1320:
// Allow modules to modify the structured node.
$type = 'node';
drupal_alter(array('node_view', 'entity_view'), $build, $type);
$node_links = $links ? $build['links']['node']['#links'] : $back_to_top ? array($build['links']['node']['#links']['faq_back_to_top']) : NULL;
unset($build['links']);
unset($build['#theme']); // We don't want node title displayed.
Also, if I select questions to be inline, the question follows the 'Q', but the answer is under the 'A' and not next to it:
Q: How do you do this?
A:
like that
And lastly, if I tell it to accordion, there is no +/- indicator to let the person know they can expand/collapse the answer. Without this, a user wouldn't know the could click on the link to expand the answer, they would wonder where the answer is.
Comment #15
stella commentedPatch from #10 committed along with a fix for the issue with it described in #14 (Undefined index: faq_back_to_top)
Comment #17
yngens commentedHave the same issue, but for Pressflow. Should I report it in a separate ticket for Drupal 6.x?
Update: Have just created #1941654: Notice: Undefined index: links in include() (line 51 of path-to-module-directory/faq-questions-top.tpl.php).. So please close this again.