[Core issue] Not able to save the Layout when we add a view in a section and the warning [You have unsaved changes.]

Created on 28 January 2020, over 5 years ago
Updated 18 April 2024, over 1 year ago

Problem/Motivation

Given that we have enabled the "Layout Builder" on a "Test" content type
And activated the Layout Builder on the default view mode
And we had a restricted views list
When and editor want to add a view to a section
And press on "Save Layout"
Then the editor will keep seeing "You have unsaved changes."
When we check the "Recent log messages"
Then we keep seeing the following error

RuntimeException: Callable "Drupal\layout_builder\Access\LayoutBuilderAccessCheck::access" requires a value for the "$section_storage" argument. in Drupal\Component\Utility\ArgumentsResolver->handleUnresolvedArgument() (line 142 of /app/docroot/core/lib/Drupal/Component/Utility/ArgumentsResolver.php).

Proposed resolution

Ignore storage if a wrong accessed section was saved, or the permission or access was changed
Not to keep showing the error or warning even if they had deleted the section
like You have unsaved changes

Remaining tasks

If the user with permission to add Views to a section
in a node with allowed Layout Builder
will be able to save the layout but show which content is not allowed or not let them add that into the section

User interface changes

Selective warning or not to show not allwed to access views or display

API changes

  • N/A

Data model changes

  • Section storage
πŸ› Bug report
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
Layout builderΒ  β†’

Last updated about 19 hours ago

Created by

πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

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.

Production build 0.71.5 2024