Got this error while working on a view with exposed filters, but that form has no title so mothership throws me that error.

We changed the line 76 from:

if($element['#title'] != 'Language' && $element['#required']) {
    $attributes['class'][] = 'form-required';
  }

to:

  if(isset($element['#title']) && $element['#title'] != 'Language' && $element['#required']) {
    $attributes['class'][] = 'form-required';
  }

That seems to work. Is there a reason why there was no isset in the first place?

Comments

mortendk’s picture

Status: Active » Fixed
mortendk’s picture

Status: Fixed » Closed (fixed)
checker’s picture

Status: Closed (fixed) » Active

I have the same problem but with #required. The error is there because i'm using admin_menu with search bar enabled (clear all caches). The form element has none #required.

if(isset($element['#title']) && isset($element['#required']) &&
$element['#title'] != 'Language' && $element['#required']) {

I hope it is ok to use this issue because it is nearly the same problem maybe.

checker’s picture

As i can see there are also other modules that cause this error like checkout forms in commerce.

mortendk’s picture

Assigned: Unassigned » mortendk

yup an error is an error you not gettin keelhauled for that

jyraya’s picture

Issue summary: View changes
StatusFileSize
new917 bytes

I meet the same problem as checker.

I am using Drupal 7.29 and Mothership 7.x-2.10.
The problem occurs in forms generated with Webform 7.x-4.0-rc6 and if I use them with another theme, I got no message.

I've made this patch that I attach to this comment. With it, I cannot the message anymore.

realityloop’s picture

Status: Active » Fixed

fixed

  • realityloop committed 5451c70 on 7.x-3.x
    Issue #1964936 by jyraya | betovarg: Fixed Notice: Undefined index: #...

  • realityloop committed 6f353b0 on
    Issue #1964936 by jyraya | betovarg: Fixed Notice: Undefined index: #...
realityloop’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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