Closed (fixed)
Project:
Iframe
Version:
8.x-1.x-dev
Component:
Miscellaneous
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
12 Mar 2016 at 16:20 UTC
Updated:
18 Mar 2016 at 07:08 UTC
Jump to comment: Most recent
I'm not too certain why this ocurrs, but it prevents me from addition iframe content...
The website encountered an unexpected error. Please try again later.
Drupal\Core\Entity\EntityStorageException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'field_iframe_frameborder' at row 1: INSERT INTO {node__field_iframe} (entity_id, revision_id, bundle, delta, langcode, field_iframe_url, field_iframe_title, field_iframe_class, field_iframe_width, field_iframe_height, field_iframe_frameborder, field_iframe_scrolling, field_iframe_transparency, field_iframe_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); Array ( [:db_insert_placeholder_0] => 136 [:db_insert_placeholder_1] => 136 [:db_insert_placeholder_2] => page [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => en [:db_insert_placeholder_5] => http://www.yahoo.com [:db_insert_placeholder_6] => Test Free Estimate [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 500 [:db_insert_placeholder_9] => 500 [:db_insert_placeholder_10] => [:db_insert_placeholder_11] => [:db_insert_placeholder_12] => [:db_insert_placeholder_13] => ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 757 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Drupal\Core\Database\Statement->execute(Array, Array)
Drupal\Core\Database\Connection->query('INSERT INTO {node__field_iframe} (entity_id, revision_id, bundle, delta, langcode, field_iframe_url, field_iframe_title, field_iframe_class, field_iframe_width, field_iframe_height, field_iframe_frameborder, field_iframe_scrolling, field_iframe_transparency, field_iframe_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)', Array, Array)
Drupal\Core\Database\Driver\mysql\Connection->query('INSERT INTO {node__field_iframe} (entity_id, revision_id, bundle, delta, langcode, field_iframe_url, field_iframe_title, field_iframe_class, field_iframe_width, field_iframe_height, field_iframe_frameborder, field_iframe_scrolling, field_iframe_transparency, field_iframe_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)', Array, Array)
Drupal\Core\Database\Driver\mysql\Insert->execute()
Drupal\Core\Entity\Sql\SqlContentEntityStorage->saveToDedicatedTables(Object, , Array)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->doSaveFieldItems(Object)
Drupal\Core\Entity\ContentEntityStorageBase->doSave(NULL, Object)
Drupal\Core\Entity\EntityStorageBase->save(Object)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object)
Drupal\Core\Entity\Entity->save()
Drupal\node\NodeForm->save(Array, Object)
call_user_func_array(Array, Array)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object)
Drupal\Core\Form\FormBuilder->processForm('node_page_form', Array, Object)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object)
Drupal\node\Controller\NodeController->add(Object)
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)
Comments
Comment #2
Q2U commentedInterestingly, when I remove the "http://" (from the iframe url string) the 1366 error is no longer thrown -- however -- the new content type is not published and instead reports the error condition "The value should be of the correct primitive type" as shown in the link to the screenshot below...
http://www.stonetonwestllc.com/sites/default/files/iframe-screenshot01.jpg
However: add the "http://" back in and clicking on the "Preview" button shows the specified iframe embedded as desired in the new content type. But executing "Submit" still fails with the 1366 error.
Comment #3
neffets commentedYes confirmed bug in version 8.x-1.2.
Were missing integer default values for frameborder ...
Fixed in dev-branch. Made just a new 8.x-1.3 version from it.
Comment #4
neffets commentedFixed in #2616178
Comment #5
Q2U commentedComment #6
Q2U commentedMy apologies. I reset this to active. I've installed the 8.x-1.3 2016-Mar-15 release and it appears that I'm having the same issue as I described in #1.
1) Created new content
2) Assigned a title and a Lorem Ipsum body
3) Enter a url in the iframe field
4) Entered a height and width
5) Pressed "Save and Publish" and the 1366 error was thrown...
Comment #7
Q2U commentedAs reported in #2, alternatively pressing the "Preview" button results in my content (with the correct URL in the iframe) displaying correctly.
For me, it appears that the 1.3 release exhibits the same 1366 issue as was originally reported.
And by the way, thank you very much for your work. I really need this module to work.
Comment #8
Q2U commentedHere's an update: I have managed to get the new content (with the specified iframe URL) to save successfully.
However, it is difficult for me to pinpoint the exact steps I took to make this happen because I changed many of the settings in Home > Administration > Structure > Content types > Page ("Manage fields", "Manage form display" and "Manage display").
I BELIEVE that what may have allowed the new content to be saved was editing the "Manage Form Display" Cog and setting 800px values for both the "width of an iframe" and the "height of an iframe."
I notice now that both of these fields are marked with a red "*" which means they are required (?). Previously I had not set a value for the fields (I had left each field empty).
I really hope this helps. Sorry I can provide more explicit steps to reproduce.
Thanks again neffets.
Comment #9
neffets commentedYou are right.
I missed to say, that you have to re-create the iframe field for you content type.
a) You can remove and add it again
or
b) you have to go through all manage-pages of the iframe module
reason: there are unexpected (undefined) values for frameborder and scrolling. Managing it, resets them to valid integer values.