When addding new flexslider settings - admin/config/media/flexslider/add

Notice: Undefined index: normal in flexslider_picture_form_ctools_export_ui_edit_item_form_alter() (line 111 of /modules/picture/flexslider_picture/flexslider_picture.module).

Notice: Undefined index: #description in flexslider_picture_form_ctools_export_ui_edit_item_form_alter() (line 111 of /modules/picture/flexslider_picture/flexslider_picture.module).

Notice: Undefined index: image_style in _flexslider_picture_ctools_export_ui_edit_item_form_submit() (line 165 of /modules/picture/flexslider_picture/flexslider_picture.module).

Warning: array_intersect_key(): Argument #1 is not an array in _flexslider_picture_ctools_export_ui_edit_item_form_submit() (line 165 of /modules/picture/flexslider_picture/flexslider_picture.module).

PDOException: SQLSTATE[HY000]: General error: 1364 Field 'imagestyle_type' doesn't have a default value: INSERT INTO {flexslider_picture_optionset} (flexslider_optionset) VALUES (:db_insert_placeholder_0); Array ( [:db_insert_placeholder_0] => flex ) in _flexslider_picture_ctools_export_ui_edit_item_form_submit() (line 170 of /modules/picture/flexslider_picture/flexslider_picture.module).

Comments

ag_design’s picture

Title: addinf new Flexslider preset fails » adding new Flexslider preset fails
jantoine’s picture

I am seeing the same issue with a clean D7.28 install.

jantoine’s picture

Status: Active » Needs review
StatusFileSize
new1.77 KB

The attached patch makes the following changes to resolve all errors when saving the flexslider preset form:

  • Removes references to $form['image_style']['normal']. I couldn't find anywhere else in the picture or flexslider modules where this is used, hence the error when trying to add to a description for it.
  • Gets form values directly from the values array rather than from an 'image_style' sub-array. For me, the $form_state['values'] array is flattened removing the 'image_style' parrent array.
  • Cleaned up the db_merge() call removing the $q variable.
jelle_s’s picture

Status: Needs review » Fixed

Fixed in latest dev. Thanks for the patch!

  • Commit ab34932 on 7.x-2.x authored by jantoine, committed by Jelle_S:
    Issue #2285255 by jantoine | ag_design: Fixed adding new Flexslider...

Status: Fixed » Closed (fixed)

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