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 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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3293908-5.patch | 1.24 KB | twfahey |
| #4 | 3293908.patch | 1.23 KB | christian.wiedemann |
Issue fork drupal-3293908
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:
- 3293908-expose-layout-builder
changes, plain diff MR !2463
Comments
Comment #3
christian.wiedemann commentedComment #4
christian.wiedemann commentedPatch for 9.4
Comment #5
twfahey commentedRerolled for latest 9.4.5
Comment #7
socialnicheguru commentedComment #8
smustgrave commentedSo #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.
Comment #9
tim.plunkettThis 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
Comment #12
smustgrave commentedLeft a comment on the postponed issue.