Maximums are adjusted according to scheme

Scheme: iframe/src/Plugin/Field/FieldType/IframeItem.php:87

        ...
        'url' => [
          'description' => 'The URL of the iframe.',
          'type' => 'varchar',
          'length' => 2048,
          'not null' => FALSE,
          'sortable' => TRUE,
          'default' => '',
        ],
        'title' => [
          'description' => 'The iframe title text.',
          'type' => 'varchar',
          'length' => 255,
          'not null' => FALSE,
          'sortable' => TRUE,
          'default' => '',
        ],
        ....

and widget base: iframe/src/Plugin/Field/FieldWidget/IframeWidgetBase.php:368

        ...
    $element['title'] = [
      '#type' => 'textfield',
      '#title' => $this->t('Iframe Title'),
      '#placeholder' => '',
      '#default_value' => $settings['title'],
      '#size' => 80,
      '#maxlength' => 1024,
      '#weight' => 2,
      // '#element_validate' => array('text'),
    ] + $required;

    $element['url'] = [
      '#type' => 'textfield',
      '#title' => $this->t('Iframe URL'),
      '#placeholder' => 'https://',
      '#default_value' => $settings['url'] ?? '',
      '#size' => 80,
      '#maxlength' => 1024,
      '#weight' => 1,
      '#element_validate' => [[$this, 'validateUrl']],
    ] + $required;
        ....

this produces the following error
Drupal\Core\Entity\EntityStorageException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column

Issue fork iframe-3330251

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Aneida created an issue. See original summary.

mnico’s picture

Version: 8.x-2.21 » 8.x-2.x-dev
Status: Active » Needs review

neffets made their first commit to this issue’s fork.

neffets’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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