Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
This Module ROCKS!
However, all things I'm trying to import an exported paragraph bundle result in the message:
The machine-readable name must contain only lowercase letters, numbers, and underscores.
Below is the originally exported paragraph bundle which I also tried importing without modification, same message:
$data = array(
'bundles' => array(
'learn_more_cta' => (object) array(
'bundle' => 'learn_more_cta',
'name' => 'Blurb',
'locked' => '1',
'bc_entity_type' => 'paragraphs_item',
),
),
'fields' => array(
'field_cta_icon' => array(
'translatable' => '0',
'entity_types' => array(),
'settings' => array(
'uri_scheme' => 'public',
'default_image' => 0,
),
'storage' => array(
'type' => 'field_sql_storage',
'settings' => array(),
'module' => 'field_sql_storage',
'active' => '1',
'details' => array(
'sql' => array(
'FIELD_LOAD_CURRENT' => array(
'field_data_field_cta_icon' => array(
'fid' => 'field_cta_icon_fid',
'alt' => 'field_cta_icon_alt',
'title' => 'field_cta_icon_title',
'width' => 'field_cta_icon_width',
'height' => 'field_cta_icon_height',
),
),
'FIELD_LOAD_REVISION' => array(
'field_revision_field_cta_icon' => array(
'fid' => 'field_cta_icon_fid',
'alt' => 'field_cta_icon_alt',
'title' => 'field_cta_icon_title',
'width' => 'field_cta_icon_width',
'height' => 'field_cta_icon_height',
),
),
),
),
),
'foreign keys' => array(
'fid' => array(
'table' => 'file_managed',
'columns' => array(
'fid' => 'fid',
),
),
),
'indexes' => array(
'fid' => array(
0 => 'fid',
),
),
'field_name' => 'field_cta_icon',
'type' => 'image',
'module' => 'image',
'active' => '1',
'locked' => '0',
'cardinality' => '1',
'deleted' => '0',
'columns' => array(
'fid' => array(
'description' => 'The {file_managed}.fid being referenced in this field.',
'type' => 'int',
'not null' => FALSE,
'unsigned' => TRUE,
),
'alt' => array(
'description' => 'Alternative image text, for the image\'s \'alt\' attribute.',
'type' => 'varchar',
'length' => 512,
'not null' => FALSE,
),
'title' => array(
'description' => 'Image title text, for the image\'s \'title\' attribute.',
'type' => 'varchar',
'length' => 1024,
'not null' => FALSE,
),
'width' => array(
'description' => 'The width of the image in pixels.',
'type' => 'int',
'unsigned' => TRUE,
),
'height' => array(
'description' => 'The height of the image in pixels.',
'type' => 'int',
'unsigned' => TRUE,
),
),
'bundles' => array(
'paragraphs_item' => array(
0 => 'learn_more_cta',
),
),
),
'field_cta_link' => array(
'translatable' => '0',
'entity_types' => array(),
'settings' => array(
'attributes' => array(
'target' => 'default',
'class' => '',
'rel' => '',
),
'url' => 0,
'title' => 'optional',
'title_value' => '',
'title_maxlength' => 128,
'enable_tokens' => 1,
'display' => array(
'url_cutoff' => 80,
),
),
'storage' => array(
'type' => 'field_sql_storage',
'settings' => array(),
'module' => 'field_sql_storage',
'active' => '1',
'details' => array(
'sql' => array(
'FIELD_LOAD_CURRENT' => array(
'field_data_field_cta_link' => array(
'url' => 'field_cta_link_url',
'title' => 'field_cta_link_title',
'attributes' => 'field_cta_link_attributes',
),
),
'FIELD_LOAD_REVISION' => array(
'field_revision_field_cta_link' => array(
'url' => 'field_cta_link_url',
'title' => 'field_cta_link_title',
'attributes' => 'field_cta_link_attributes',
),
),
),
),
),
'foreign keys' => array(),
'indexes' => array(),
'field_name' => 'field_cta_link',
'type' => 'link_field',
'module' => 'link',
'active' => '1',
'locked' => '0',
'cardinality' => '1',
'deleted' => '0',
'columns' => array(
'url' => array(
'type' => 'varchar',
'length' => 2048,
'not null' => FALSE,
'sortable' => TRUE,
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'sortable' => TRUE,
),
'attributes' => array(
'type' => 'text',
'size' => 'medium',
'not null' => FALSE,
),
),
'bundles' => array(
'paragraphs_item' => array(
0 => 'learn_more_cta',
),
),
),
'field_cta_teaser' => array(
'translatable' => '0',
'entity_types' => array(),
'settings' => array(),
'storage' => array(
'type' => 'field_sql_storage',
'settings' => array(),
'module' => 'field_sql_storage',
'active' => '1',
'details' => array(
'sql' => array(
'FIELD_LOAD_CURRENT' => array(
'field_data_field_cta_teaser' => array(
'value' => 'field_cta_teaser_value',
'format' => 'field_cta_teaser_format',
),
),
'FIELD_LOAD_REVISION' => array(
'field_revision_field_cta_teaser' => array(
'value' => 'field_cta_teaser_value',
'format' => 'field_cta_teaser_format',
),
),
),
),
),
'foreign keys' => array(
'format' => array(
'table' => 'filter_format',
'columns' => array(
'format' => 'format',
),
),
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'field_name' => 'field_cta_teaser',
'type' => 'text_long',
'module' => 'text',
'active' => '1',
'locked' => '0',
'cardinality' => '1',
'deleted' => '0',
'columns' => array(
'value' => array(
'type' => 'text',
'size' => 'big',
'not null' => FALSE,
),
'format' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
),
'bundles' => array(
'paragraphs_item' => array(
0 => 'learn_more_cta',
),
),
),
'field_cta_title' => array(
'translatable' => '0',
'entity_types' => array(),
'settings' => array(
'max_length' => '255',
),
'storage' => array(
'type' => 'field_sql_storage',
'settings' => array(),
'module' => 'field_sql_storage',
'active' => '1',
'details' => array(
'sql' => array(
'FIELD_LOAD_CURRENT' => array(
'field_data_field_cta_title' => array(
'value' => 'field_cta_title_value',
'format' => 'field_cta_title_format',
),
),
'FIELD_LOAD_REVISION' => array(
'field_revision_field_cta_title' => array(
'value' => 'field_cta_title_value',
'format' => 'field_cta_title_format',
),
),
),
),
),
'foreign keys' => array(
'format' => array(
'table' => 'filter_format',
'columns' => array(
'format' => 'format',
),
),
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'field_name' => 'field_cta_title',
'type' => 'text',
'module' => 'text',
'active' => '1',
'locked' => '0',
'cardinality' => '1',
'deleted' => '0',
'columns' => array(
'value' => array(
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
),
'format' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
),
'bundles' => array(
'paragraphs_item' => array(
0 => 'learn_more_cta',
),
),
),
),
'instances' => array(
'field_cta_icon' => array(
0 => array(
'label' => 'Icon',
'widget' => array(
'weight' => '1',
'type' => 'media_generic',
'module' => 'media',
'active' => 1,
'settings' => array(
'allowed_types' => array(
'image' => 'image',
'audio' => 0,
'video' => 0,
'default' => 0,
),
'allowed_schemes' => array(
'public' => 'public',
'youtube' => 0,
),
'progress_indicator' => 'throbber',
),
),
'settings' => array(
'file_directory' => 'cta/icons',
'file_extensions' => 'png gif jpg jpeg',
'max_filesize' => '',
'max_resolution' => '',
'min_resolution' => '',
'alt_field' => 0,
'title_field' => 0,
'default_image' => 0,
'user_register_form' => FALSE,
),
'display' => array(
'default' => array(
'label' => 'hidden',
'type' => 'image',
'weight' => '0',
'settings' => array(
'image_style' => 'square_thumbnail',
'image_link' => 'content',
),
'module' => 'image',
),
'paragraphs_editor_preview' => array(
'type' => 'hidden',
'label' => 'above',
'settings' => array(),
'weight' => 0,
),
),
'required' => 0,
'description' => '',
'fences_wrapper' => 'div_div_div',
'field_name' => 'field_cta_icon',
'entity_type' => 'paragraphs_item',
'bundle' => 'learn_more_cta',
'deleted' => '0',
),
),
'field_cta_link' => array(
0 => array(
'label' => 'CTA Link',
'widget' => array(
'weight' => '4',
'type' => 'link_field',
'module' => 'link',
'active' => 0,
'settings' => array(),
),
'settings' => array(
'absolute_url' => 1,
'validate_url' => 1,
'url' => 0,
'title' => 'optional',
'title_value' => '',
'title_label_use_field_label' => 0,
'title_maxlength' => '128',
'enable_tokens' => 1,
'display' => array(
'url_cutoff' => '80',
),
'attributes' => array(
'target' => 'default',
'rel' => '',
'configurable_class' => 0,
'class' => '',
'configurable_title' => 0,
'title' => '',
),
'rel_remove' => 'default',
'user_register_form' => FALSE,
),
'display' => array(
'default' => array(
'label' => 'hidden',
'type' => 'link_default',
'weight' => '3',
'settings' => array(),
'module' => 'link',
),
'paragraphs_editor_preview' => array(
'type' => 'hidden',
'label' => 'above',
'settings' => array(),
'weight' => 0,
),
),
'required' => 0,
'description' => '',
'fences_wrapper' => 'div_div_div',
'default_value' => NULL,
'field_name' => 'field_cta_link',
'entity_type' => 'paragraphs_item',
'bundle' => 'learn_more_cta',
'deleted' => '0',
),
),
'field_cta_teaser' => array(
0 => array(
'label' => 'Teaser',
'widget' => array(
'weight' => '3',
'type' => 'text_textarea',
'module' => 'text',
'active' => 1,
'settings' => array(
'rows' => '5',
),
),
'settings' => array(
'text_processing' => '1',
'user_register_form' => FALSE,
),
'display' => array(
'default' => array(
'label' => 'hidden',
'type' => 'text_default',
'weight' => '2',
'settings' => array(),
'module' => 'text',
),
'paragraphs_editor_preview' => array(
'type' => 'hidden',
'label' => 'above',
'settings' => array(),
'weight' => 0,
),
),
'required' => 0,
'description' => '',
'fences_wrapper' => 'div_div_div',
'default_value' => NULL,
'field_name' => 'field_cta_teaser',
'entity_type' => 'paragraphs_item',
'bundle' => 'learn_more_cta',
'deleted' => '0',
),
),
'field_cta_title' => array(
0 => array(
'label' => 'Title',
'widget' => array(
'weight' => '2',
'type' => 'text_textfield',
'module' => 'text',
'active' => 1,
'settings' => array(
'size' => '60',
),
),
'settings' => array(
'text_processing' => '0',
'user_register_form' => FALSE,
),
'display' => array(
'default' => array(
'label' => 'hidden',
'type' => 'text_default',
'weight' => '1',
'settings' => array(),
'module' => 'text',
),
'paragraphs_editor_preview' => array(
'type' => 'hidden',
'label' => 'above',
'settings' => array(),
'weight' => 0,
),
),
'required' => 0,
'description' => '',
'fences_wrapper' => 'div_div_div',
'default_value' => NULL,
'field_name' => 'field_cta_title',
'entity_type' => 'paragraphs_item',
'bundle' => 'learn_more_cta',
'deleted' => '0',
),
),
),
);
Steps to reproduce:
1. With paragraphs-7.x-1.0-rc4, click the Import tab under Paragraph Bundles
1. Copy/Paste the above export into the text field
1. Click Import. See the message.
Comments
Comment #2
texas-bronius CreditAttribution: texas-bronius commentedComment #3
Dries ArnoldsI have the same problem here.
Comment #4
thomasmurphy CreditAttribution: thomasmurphy commentedSame problem for me. I'm going to assume this is a bug until we hear otherwise from the module maintainer.
Comment #5
thomasmurphy CreditAttribution: thomasmurphy commentedComment #6
steveOR CreditAttribution: steveOR as a volunteer commentedI had this exact error also, and found the issue is in bundle_copy module not paragraphs. I was able to resolve with this bundle_copy patch:
https://www.drupal.org/node/2593373#comment-11176411
Am currently using paragraphs 7.x-1.0-rc5 and bundle_copy 7.x-2.x-dev
Perhaps this paragraphs issue shall be closed...
Comment #7
jstollerIn an effort to cleanup the Paragraphs issue queue I'm closing this ticket and marking it "outdated." If you find this is still a problem with the latest Paragraphs 7.x-1.x-dev release than please reopen the issue.