Support for Layout Paragraphs

Created on 27 August 2022, almost 2 years ago
Updated 23 March 2023, over 1 year ago

Hi, is it possible to add support for the Layout Paragraphs module? I'm using this module a lot and recently I've started to use your module, which is great, but unfortunately it doesn't respect configuration from Layout Paragraphs module.

Steps to reproduce:

  1. Install Layout Paragraphs and Entity Share modules.
  2. Add Layout Paragraphs field to the Page node.
  3. Put some components into the Layout paragraph and save the page.
  4. Pull your page on the client instance.
  5. Paragraphs should be imported correctly, but the child paragraph is not nested in the Layout paragraph.

P.S. The same applies to disabling paragraphs: when I disable a paragraph (put it into Disabled items section), this also doesn't work.

I think it might be related to the behavior_settings from Paragraphs module, because after pulling the content I see that this data is not propagated into the client's database.

Feature request
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

🇵🇱Poland tivi22

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India Abhijith S

    Getting this error while trying to pull layout paragraph pages. The paragraph reference field contents are transferred.

    Already tried the Serialized Data (Entity Share) field Enhancer from this issue https://www.drupal.org/project/entity_share/issues/3143003 Compatibility with paragraph behaviors Fixed , but still getting this error while importing contents.

    An AJAX HTTP error occurred.
    HTTP Result Code: 500
    Debugging information follows.
    Path: /batch?id=1166&op=do_nojs&op=do
    StatusText: error
    ResponseText: The website encountered an unexpected error. Please try again later.Symfony\Component\Serializer\Exception\UnexpectedValueException: The property 'layout_paragraphs' does not exist on the 'behavior_settings' field of type 'string_long'. Writable properties are: 'value'. in Drupal\jsonapi\Normalizer\FieldItemNormalizer->denormalize() (line 163 of core/modules/jsonapi/src/Normalizer/FieldItemNormalizer.php). Drupal\jsonapi_extras\Normalizer\JsonApiNormalizerDecoratorBase->denormalize(Array, 'Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem', 'api_json', Array) (Line: 196)
    Symfony\Component\Serializer\Serializer->denormalize(Array, 'Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem', 'api_json', Array) (Line: 75)
    Drupal\jsonapi\Serializer\Serializer->denormalize(Array, 'Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem', 'api_json', Array) (Line: 65)
    Drupal\jsonapi\Normalizer\FieldNormalizer->denormalize(Array, '\Drupal\Core\Field\FieldItemList', 'api_json', Array) (Line: 196)
    Symfony\Component\Serializer\Serializer->denormalize(Array, '\Drupal\Core\Field\FieldItemList', 'api_json', Array) (Line: 75)
    Drupal\jsonapi\Serializer\Serializer->denormalize(Array, '\Drupal\Core\Field\FieldItemList', 'api_json', Array) (Line: 85)
    Drupal\jsonapi\Normalizer\ContentEntityDenormalizer->prepareInput(Array, Object, 'api_json', Array) (Line: 99)
    Drupal\jsonapi\Normalizer\EntityDenormalizerBase->denormalize(Array, 'Drupal\paragraphs\Entity\Paragraph', 'api_json', Array) (Line: 45)
    Drupal\jsonapi_extras\Normalizer\JsonApiNormalizerDecoratorBase->denormalize(Array, 'Drupal\paragraphs\Entity\Paragraph', 'api_json', Array) (Line: 16)
    Drupal\jsonapi_extras\Normalizer\ContentEntityDenormalizer->denormalize(Array, 'Drupal\paragraphs\Entity\Paragraph', 'api_json', Array) (Line: 196)
    Symfony\Component\Serializer\Serializer->denormalize(Array, 'Drupal\paragraphs\Entity\Paragraph', 'api_json', Array) (Line: 75)
    Drupal\jsonapi\Serializer\Serializer->denormalize(Array, 'Drupal\paragraphs\Entity\Paragraph', 'api_json', Array) (Line: 169)
    Drupal\jsonapi\Normalizer\JsonApiDocumentTopLevelNormalizer->denormalize(Array, 'Drupal\paragraphs\Entity\Paragraph', 'api_json', Array) (Line: 68)
    Drupal\entity_share_client\Service\JsonapiHelper->extractEntity(Array) (Line: 454)
    Drupal\entity_share_client\Service\ImportService->getProcessedEntity(Array) (Line: 279)
    Drupal\entity_share_client\Service\ImportService->importEntityListData(Array) (Line: 257)
    Drupal\entity_share_client\Plugin\EntityShareClient\Processor\EntityReference->importUrl(Object, 'http://ddev-test-web/jsonapi/node/landing/0f149313-1582-4a33-91ac-e63a1ac4c9db/field_component_content?resourceVersion=id%3A78700') (Line: 145)
    Drupal\entity_share_client\Plugin\EntityShareClient\Processor\EntityReference->processEntity(Object, Object, Array) (Line: 297)
    Drupal\entity_share_client\Service\ImportService->importEntityListData(Array) (Line: 55)
    Drupal\entity_share_client\ImportBatchHelper::importUrlBatch(Object, 'http://ddev-test-web/jsonapi/node/landing?page%5Blimit%5D=50&filter%5Buuid-filter%5D%5Bcondition%5D%5Bpath%5D=id&filter%5Buuid-filter%5D%5Bcondition%5D%5Boperator%5D=IN&filter%5Buuid-filter%5D%5Bcondition%5D%5Bvalue%5D%5B0%5D=0f149313-1582-4a33-91ac-e63a1ac4c9db', Array) (Line: 295)
    _batch_process() (Line: 137)
    _batch_do() (Line: 93)
    _batch_page(Object) (Line: 55)
    Drupal\system\Controller\BatchController->batchPage(Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 270)
    Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 137)
    Drupal\shield\ShieldMiddleware->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 49)
    Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 713)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
  • 🇵🇱Poland tivi22

    Hi, did you set this field enhancer both on server & client instances?

  • 🇮🇳India Abhijith S

    @tivi22 Field enhancer is set on both environments. But still getting the error.

  • 🇮🇳India Abhijith S

    Adding patch since the Serialized Data (Entity Share) field Enhancer is not working in my case.

  • Status changed to Needs review over 1 year ago
  • Assigned to Grimreaper
  • 🇫🇷France Grimreaper France 🇫🇷
  • 🇫🇷France Grimreaper France 🇫🇷
  • Issue was unassigned.
  • Status changed to Closed: works as designed over 1 year ago
  • 🇫🇷France Grimreaper France 🇫🇷

    Hi,

    Please ensure that the "Serialized Data (Entity Share)" field enhancer is enabled on all the "behavior_settings" "field" on all your paragraph types on both client and server.

    I made a test with a "layout" paragraph type and a plain text paragraph type.

    I set the administrative label in the section.

    And here is the result on the client website.

    Both layout and administrative label had been pulled.

    I have not encountered the error:

    The property 'layout_paragraphs' does not exist on the 'behavior_settings' field of type 'string_long

    So I guess that you forgot to enable the field enhancer on some paragraph types.

Production build 0.69.0 2024