Expose Layout Builder Sections to entity view displays (jsonapi/entity_view_display/entity_view_display)

Created on 2 July 2022, almost 2 years ago
Updated 23 April 2023, about 1 year ago

Problem/Motivation

Layout builder Sections are removed jsonapi entity view displays.

This is follow up issue for Expose Layout Builder data to REST and JSON:API πŸ“Œ [PP-1] Expose Layout Builder data to REST and JSON:API Postponed and Allow marking a config schema types to be marked as "internal" (to avoid exposing them via HTTP APIs) β†’ .

Steps to reproduce

Open an entity view display "jsonapi/entity_view_display/entity_view_display". There is no "sections" under "third_party_settings/layout_builder"

The responsibe code is "Drupal\jsonapi\Normalizer\ResourceObjectNormalizer:196";

      // @todo Replace this workaround after https://www.drupal.org/node/3043245
      //   or remove the need for this in https://www.drupal.org/node/2942975.
      //   See \Drupal\layout_builder\Normalizer\LayoutEntityDisplayNormalizer.
      if ($context['resource_object']->getResourceType()->getDeserializationTargetClass() === 'Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay' && $context['resource_object']->getField('third_party_settings') === $field) {
        unset($field['layout_builder']['sections']);
      }

Proposed resolution

This patch remove this unset.

πŸ“Œ Task
Status

Postponed: needs info

Version

10.1 ✨

Component
JSON APIΒ  β†’

Last updated about 12 hours ago

Created by

πŸ‡©πŸ‡ͺGermany Christian.wiedemann

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.

  • Open on Drupal.org β†’
    Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    Waiting for branch to pass
  • Open on Drupal.org β†’
    Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    Waiting for branch to pass
  • Status changed to Needs work about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    So #5 was uploaded for others but not to be reviewed as nothing is going into 9.4

    MR 2463 has a valid failure for 9.5

    To me this feels like a feature request that will need it's own test coverage.

  • Status changed to Postponed: needs info about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States tim.plunkett Philadelphia

    This is a follow-up to an issue that is not done yet. Either this should be marked as postponed, or fold it into the existing issue and mark this as a duplicate

Production build 0.69.0 2024