When I hide the Category in the FAQ content type's display, I get this message:

Notice: Undefined index: module in faq_ask_form_faq_node_form_alter() (line 337 of /var/.../sites/all/modules/contrib/faq_ask/faq_ask.module).

Comments

michieljoris’s picture

Same here. After disabling the module the error goes away. However the latest dev version is ok.

stenjo’s picture

Assigned: Unassigned » stenjo
Status: Active » Fixed

Technically not an error. Its a notice. It is however fixed in the dev version.
Will be OK on the next alpha release. Coming soon

Status: Fixed » Closed (fixed)

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

frederickjh’s picture

Hi

I am a bit confused. This issue report is for the 7.x-1.0-alpha1. Above it says that it is fixed in the dev version just downloaded 7.x-1.x-dev and diff the faq_ask.module from both and did not find any differences before or on the lines mention in my error messages. I am therefore reopening this issue.

My error messages were:

Notice: Undefined index: module in faq_ask_form_faq_node_form_alter() (Line 276 of /home/httpd/vhosts/traumlandschweiz.ch/httpdocs/sites/all/modules/contrib/faq_ask/faq_ask.module).

Notice: Undefined index: module in faq_ask_form_faq_node_form_alter() (Line 337 of /home/httpd/vhosts/traumlandschweiz.ch/httpdocs/sites/all/modules/contrib/faq_ask/faq_ask.module).

God Bless!
Frederick

frederickjh’s picture

I added
$properties['display']['default']['module'] = "";
on line 271 and this stopped the messages. See Thomas' comment about this on this blog. http://www.citytree.be/blog/undefined-index-quick-fix-in-drupal7-error-r...

frederickjh’s picture

Status: Closed (fixed) » Active

Hi!

Sorry the code change I posted above did not work. I did a diff of the 7.x-1.x-dev version and found that this was fixed on line 337 but not on line 276. Changing the code around line 276 from:

    foreach ($fields as $name => $properties) {
      if ($properties['display']['default']['module'] == 'taxonomy' && isset($form[$name])) {
       hide($form[$name]);                              // Hide form if it is a taxonomy field
       $form[$name][$language]['#required'] = FALSE;    // If hidden, then do not expect it to be required
      }

to

    foreach ($fields as $name => $properties) {
      if (isset($properties['display']['default']['module'])
            && $properties['display']['default']['module'] == 'taxonomy' && isset($form[$name])) {
       hide($form[$name]);                              // Hide form if it is a taxonomy field
       $form[$name][$language]['#required'] = FALSE;    // If hidden, then do not expect it to be required
      }