Iframe 7.x-1.x-dev

I enter this as my URL:
http://www.youtube.com/watch?feature=player_detailpage&v=-U7C4olOIS8

and I get the following error:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'field_video_url_frameborder' cannot be null: INSERT INTO {field_data_field_video_url} (entity_type, entity_id, revision_id, bundle, delta, language, field_video_url_url, field_video_url_title, field_video_url_class, field_video_url_width, field_video_url_height, field_video_url_frameborder, field_video_url_scrolling, field_video_url_transparency) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 43 [:db_insert_placeholder_2] => 43 [:db_insert_placeholder_3] => slide [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => http://www.youtube.com/watch?feature=player_detailpage&v=-U7C4olOIS8 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => [:db_insert_placeholder_10] => [:db_insert_placeholder_11] => [:db_insert_placeholder_12] => [:db_insert_placeholder_13] => ) in field_sql_storage_field_storage_write() (line 451 of C:\wamp\www\cmi\modules\field\modules\field_sql_storage\field_sql_storage.module).

Settings for iframe field:
width of an iframe: 100%
height of an iframe: 800
Additional CSS Class: iframe_field_info instance_settings
Frameborder: show frameborder
Scrolling: Scrolling enabled
Transparency: no transparency
Number of values: 1
default width of an iframe: 100%
default height of an iframe: 800
Additional CSS Class: iframe_field_info instance_settings
Frameborder: show frameborder
Scrolling: Scrolling enabled
Transparency: no transparency
Widget: URL only

Any advice on how to troubleshoot this? Attached is the structure for the iframe table.

CommentFileSizeAuthor
#1 iframe-fields.pdf176.29 KBstanb

Comments

stanb’s picture

Issue summary: View changes
StatusFileSize
new176.29 KB
daften’s picture

I think before a save happens, the default settings array needs to be merged with the element from the field. I don't have time to fix it ATM, I'll try to take a look tomorrow.

neffets’s picture

Assigned: Unassigned » neffets
Status: Active » Fixed

fixes #2206037 - module restructured, now module uses _presave function to fill in missing (but yet pre-defined) attributes for each instance-entity of iframe, preventing the PDOException about missing frameborder-attribute

Fixed in dev

Status: Fixed » Closed (fixed)

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

gordon.waters’s picture

I Know this is closed, however I have installed 7.x-1.1 on 7.28 and i am getting this error when trying to save an iframe.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'field_iframe_frameborder' cannot be null: INSERT INTO {field_data_field_iframe} (entity_type, entity_id, revision_id, bundle, delta, language, field_iframe_url, field_iframe_title, field_iframe_class, field_iframe_width, field_iframe_height, field_iframe_frameborder, field_iframe_scrolling, field_iframe_transparency) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 3 [:db_insert_placeholder_2] => 3 [:db_insert_placeholder_3] => page [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => http://www.majorscreek.org.au/weather/wconsole/wconsole.html [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => 100% [:db_insert_placeholder_10] => 700 [:db_insert_placeholder_11] => [:db_insert_placeholder_12] => [:db_insert_placeholder_13] => ) in field_sql_storage_field_storage_write() (line 451 of /usr/home/majorscreek/www1.majorscreek.org.au/html/modules/field/modules/field_sql_storage/field_sql_storage.module).

Thanks

mhoff’s picture

I received the same error gordon.waters with a 7.x-1.1 install on 7.29. I removed it and installed 7.x-1.x-dev and I no longer get the error. Maybe the fix in dev was not merged. I am using this on a small site hoping that dev is stable.

graysonecooper’s picture

I get the same issue when using Feeds to import new content with an Iframe present (I have a default value for the IFrame set, so that it can reference the text that I import with Feeds into other fields. Separate issue that IFrame fields are not exposed to Rules or Feeds)

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'field_essay_1_gd_frameborder' cannot be null: INSERT INTO {field_data_field_essay_1_gd} (entity_type, entity_id, revision_id, bundle, delta, language, field_essay_1_gd_url, field_essay_1_gd_title, field_essay_1_gd_class, field_essay_1_gd_width, field_essay_1_gd_height, field_essay_1_gd_frameborder, field_essay_1_gd_scrolling, field_essay_1_gd_transparency, field_essay_1_gd_tokensupport) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 52533 [:db_insert_placeholder_2] => 52533 [:db_insert_placeholder_3] => 2018_student_application_part_2_ [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => [node:field_essay_1_url] [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => [:db_insert_placeholder_10] => [:db_insert_placeholder_11] => [:db_insert_placeholder_12] => [:db_insert_placeholder_13] => [:db_insert_placeholder_14] => ) in field_sql_storage_field_storage_write() (line 514 of /var/www/vhosts/[...]/modules/field/modules/field_sql_storage/field_sql_storage.module).

Note: Using:
Drupal 7.56
Feeds 7.x-2.0-beta4
IFrame 7.x-1.8

Confirmed error persists on Dev version of IFrame. When removing the default value from the IFrame field, upload works properly on Feeds. With default value in tact, normal save works properly.

tboggia’s picture

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'field_leadgen_frameborder' cannot be null

I also got this error when trying to use Feeds and SOAP Web Services to update a content type that uses a non-required iframe field with a default value. The import worked when I removed the default iframe. Of course this is a bummer cause now I have to figure out how to bulk re-add the default to all the imported nodes.

Thanks @graysoonecooper, I never would have thought to remove the default.

sano’s picture

the @tboggia mentioned issue can be fixed by mapping data into the iframe field, as that functionality was added last year in august. See https://www.drupal.org/project/iframe/issues/2775109 for more info.

sano’s picture

added "related issue" url