In File Types > Image > Manage File Display, I have the following php notifications:

    Notice: Undefined index: settings in flexslider_fields_field_formatter_settings_form() (line 57 of /usr4/drupal/sites7/arizonawet.arizona.edu/modules/contrib/flexslider/flexslider_fields/flexslider_fields.module).
    Notice: Undefined index: bundle in flexslider_fields_field_formatter_settings_form() (line 62 of /usr4/drupal/sites7/arizonawet.arizona.edu/modules/contrib/flexslider/flexslider_fields/flexslider_fields.module).
    Notice: Undefined index: field_name in flexslider_fields_field_formatter_settings_form() (line 62 of /usr4/drupal/sites7/arizonawet.arizona.edu/modules/contrib/flexslider/flexslider_fields/flexslider_fields.module).
    Notice: Undefined index: bundle in flexslider_fields_field_formatter_settings_form() (line 62 of /usr4/drupal/sites7/arizonawet.arizona.edu/modules/contrib/flexslider/flexslider_fields/flexslider_fields.module).

These all come from the portion of the module code dedicated to the code section:
"// If the image field doesn't have the Title field enabled, tell the user."

I think the states of the 'settings,' 'bundle,' and 'field_name' variables need to checked somewhere, but don't know how or where.

Suggestions?

Edit: Interestingly, I thought I might be able to just circumvent this notification by "enabling the text field for this image field" in the File Types > Image > Manage File Display, Flexslider Display Settings. I clicked on the "enable title field" link under the "Use image title as the caption" select box. Received this error: The requested page "/admin/structure/types/manage//fields/?destination=admin%2Fstructure%2Ftypes%2Fmanage%2F%2Fdisplay&render=overlay" could not be found. Are they related?

Comments

mastoll’s picture

Is anyone else using the Flex Slider and encountering the same problems?

design.er’s picture

Yes, i use the same modules and receive the same errors.

busla’s picture

Happened after I upgraded file_entity from unstable07 to dev.

mastoll’s picture

#bulsa, what does dev give you that unstable07 doesn't? Or, how are they different? That difference may point to the problem.

busla’s picture

sahaj’s picture

Also getting the same kind of errors. Any idea how to solve this?

sahaj’s picture

Issue summary: View changes

new evidence may be related to this problem

ron_s’s picture

Version: 7.x-2.0-alpha1 » 7.x-2.0-alpha3

Same problem exists in alpha3:

Notice: Undefined index: settings in flexslider_fields_field_formatter_settings_form() (line 67 of /sites/all/modules/contrib/flexslider/flexslider_fields/flexslider_fields.module).
Notice: Undefined index: field_name in flexslider_fields_field_formatter_settings_form() (line 72 of /sites/all/modules/contrib/flexslider/flexslider_fields/flexslider_fields.module).

The problem is that line 67 requires $instance['settings']['title_field'], and line 72 requires $instance['field_name']. Neither of these exist in the $instance array for the Manage File Display page that File Entity 2.x creates.

The Manage File Display page presents a checkbox list of "Enabled displays." The page builds off the standard Manage Display page. The standard Manage Display page has a layout of fields that can be modified for different display options -- for example, an image field where it is possible to choose Image, Picture, Flexslider, etc. as the format. The code for these fields is also being executed by Manage File Display.

A basic solution would be to wrap the entire if/else statement in flexslider_fields.module in an isset for title_field:

if (isset($instance['settings']['title_field'])) {
  if ($instance['settings']['title_field'] == FALSE) {
    $form['caption'] = array(
      ...

A better solution would be to bypass the entire $form array, since it's really unnecessary when modifying Manage File Display settings. So another option would be for the entire section starting at line 43 to be wrapped with an "if" statement that checks the 'entity_type' value:

$form = array();
if ($instance['entity_type'] != 'file') {
  // Show select box for the option set
  $optionsets = array();
  ...
}
return $form;

It may also be worthwhile to consider solving this in the File Entity module, since the Manage File Display page is really the non-standard piece of the equation.

amaria’s picture

Status: Active » Closed (outdated)

Assuming this is fixed in the latest code since I no longer see the errors.