Problem/Motivation

The following error is reported when using this module with component_content, cohesion_layout, comment, content_moderation_state, focal_point, file, media, menu_link_content, path_alias, shortcut, taxonomy_term, user, or webform_submission entities after selecting a bundle:
Drupal\Core\Entity\Query\QueryException: 'type' not found in Drupal\Core\Entity\Query\Sql\Tables->ensureEntityTable() (line 369 of /home/ide/project/docroot/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php)

Proposed resolution

These entities likely either use a different notation for their bundles, or don't have any. Check which is the case for each of the above, and allow the code to handle either gracefully.

Comments

mandclu created an issue. See original summary.

mandclu’s picture

Status: Active » Needs review
StatusFileSize
new636 bytes

Here's a patch that should fix the issue.

mandclu’s picture

StatusFileSize
new2.36 KB

I discovered that the previous patch didn't prevent fatal errors with entities that don't use bundles, so here's an updated path that excludes these entities and will also gracefully redirect if someone tries to put one manually into the path.

mandclu’s picture

StatusFileSize
new2.51 KB

Since the current implementation relies on leveraging an EntityListBuilder for getting available operations, here's an updated patch that excludes entity types without an EntityListBuilder supported.

mandclu’s picture

StatusFileSize
new3.38 KB

Oy, another patch. Maybe fourth time's a charm?

  • mandclu committed 62763f2 on 1.0.x
    Issue #3254750 by mandclu: WSOD for some entity types
    
mandclu’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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