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

WorkspacesHtmlEntityFormController builds entity forms twice

$
0
0

Problem/Motivation

\Drupal\workspaces\Controller\WorkspacesHtmlEntityFormController::getContentResult() calls ::getFormObject() once at the beginning of the method to retrieve the entity from the form object, and again at the end through the call to ::getContentResult() on the inner service.

Steps to reproduce

- add a breakpoint in a hook_entity_create() implementation and load the entity add page for a workspace-supported entity type
- notice that the breakpoint gets hit twice

Proposed resolution

Retrieve the entity "manually" from the route match object.

Remaining tasks

Review.

User interface changes

Nope.

Introduced terminology

None.

API changes

Nope.

Data model changes

Nope.

Release notes snippet

Nope.


Viewing all articles
Browse latest Browse all 296177

Trending Articles



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