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

CommentFileSizeAuthor
#2 hook_event_dispatcher-3387995-2.patch1.06 KBlamp5
Command icon 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

lamp5 created an issue. See original summary.

lamp5’s picture

Status: Active » Needs review
StatusFileSize
new1.06 KB
el7cosmos’s picture

Version: 3.x-dev » 4.x-dev

el7cosmos’s picture

Status: Needs review » Fixed

  • el7cosmos committed 86789872 on 4.x
    Issue #3387995 by el7cosmos, lamp5: TypeError:...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.