Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299308

Trying to edit a locked field in the UI throws a WSOD

$
0
0

Problem/Motivation

Trying to edit a locked field in the field UI throws a WSOD page.
This shouldn't be the case, in my opinion at least a 403 should be thrown, or a page showing a clear message that this action is not permissible.

TypeError: Drupal\Core\Form\SubformState::createForSubform(): Argument #1 ($subform) must be of type array, null given, called in /var/web/vd17831/vib-conferences/release/web/core/modules/field_ui/field_ui.module on line 299 in Drupal\Core\Form\SubformState::createForSubform() (line 60 of core/lib/Drupal/Core/Form/SubformState.php).
field_ui_form_field_config_edit_form_alter(Array, Object, 'field_config_edit_form') (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'field_config_edit_form') (Line: 841)
Drupal\Core\Form\FormBuilder->prepareForm('field_config_edit_form', Array, Object) (Line: 284)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)

Steps to reproduce

  • Start with a clean D10 and enable layout builder on a node type
  • Edit the body field, and replace `body` in the URL with the layout field name: `layout_builder__layout`
  • See the WSOD thrown

Proposed resolution

I have not had the time to look into a proper fix, but if I can I will create a MR.

Remaining tasks

Create MR.

User interface changes

Throw a 403, or show a clear message that this action is not permissible.


Viewing all articles
Browse latest Browse all 299308

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>