Problem/Motivation
On Drupal 9.4 we can see this error when try to add new node with paragraphs.
One of our paragraphs type named "404".
We can see this error:
TypeError: core_event_dispatcher_entity_create_access(): Argument #3 ($entityBundle) must be of type ?string, int given, called in /app/docroot/modules/contrib/hook_event_dispatcher/src/HookEventDispatcherModuleHandler.php on line 76 in core_event_dispatcher_entity_create_access() (line 315 of /app/docroot/modules/contrib/hook_event_dispatcher/modules/core_event_dispatcher/core_event_dispatcher.module)
Steps to reproduce
- Enable core_event_dispatcher
- Create paragraph type named 404
- Add this paragraph type to reference field
- Try to add node with this paragraph
Proposed resolution
We should cast $entityBundle if exist to string.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | hook_event_dispatcher-3387995-2.patch | 1.06 KB | lamp5 |
Issue fork hook_event_dispatcher-3387995
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:
Comments
Comment #2
lamp5Comment #3
el7cosmosComment #5
el7cosmos