We updated to the latest beta (beta2) and experienced errors while attempting to edit a layout. We would get:

InvalidArgumentException: EntityDisplay entities can only handle fieldable entity types. in Drupal\Core\Entity\EntityDisplayBase->__construct() (line 126 of core/lib/Drupal/Core/Entity/EntityDisplayBase.php).

Please find the attached patch that resolves this by adding a guard to ensure that the entity is fieldable.

After that, we experienced a second issue that I've also provided a patch for. Just adds a guard around $section_storage to ensure that it's not NULL.

Comments

zseguin created an issue. See original summary.

zseguin’s picture

StatusFileSize
new3.51 KB
phenaproxima’s picture

Status: Active » Needs work

EDIT: Redacted -- investigating this closer, it made more sense.

phenaproxima’s picture

Status: Needs work » Needs review
StatusFileSize
new1.9 KB

Refactored this a bit to remove one of the if statements. I also need to add test coverage.

phenaproxima’s picture

Title: Resolve issues introduced in #3116257 » EntityRouteProvider breaks default layouts
Priority: Normal » Major

Re-titling for clarity.

phenaproxima’s picture

StatusFileSize
new1.27 KB

Here's test coverage which should prove the bug.

Status: Needs review » Needs work

The last submitted patch, 6: 3120388-6-FAIL.patch, failed testing. View results

phenaproxima’s picture

Status: Needs work » Needs review
StatusFileSize
new1.89 KB

This increases the coverage a bit by trying to edit the default layout in every scenario. It should fail every run of LayoutBuilderIntegrationTest.

Status: Needs review » Needs work

The last submitted patch, 8: 3120388-8-FAIL.patch, failed testing. View results

phenaproxima’s picture

Status: Needs work » Needs review
StatusFileSize
new16.86 KB

A work-in-progress. This is a significant rewrite of most routing-related parts of this module, so let's see how it does.

Status: Needs review » Needs work

The last submitted patch, 10: 3120388-10.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

phenaproxima’s picture

Status: Needs work » Needs review
StatusFileSize
new16.87 KB

Whoops, fixed a bad service ID.

Status: Needs review » Needs work

The last submitted patch, 12: 3120388-12.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

phenaproxima’s picture

Status: Needs work » Needs review
StatusFileSize
new18.07 KB

This should fix the failures.

phenaproxima’s picture

StatusFileSize
new25.86 KB

Changed some things, but I'm much happier with this from an API design standpoint. This unifies all contexts under a single namespace while maintaining some namespace separation, which should make things both simpler and more flexible.

Status: Needs review » Needs work

The last submitted patch, 15: 3120388-15.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

phenaproxima’s picture

Status: Needs work » Needs review
StatusFileSize
new26.43 KB

Whoops, forgot to change a context mapping in a test.

phenaproxima’s picture

StatusFileSize
new26.74 KB

Let's test against the 4.x HEAD of Page Manager, and ensure that we conflict with 8.x-4.0-beta5 or older.

phenaproxima’s picture

StatusFileSize
new27.69 KB

Added a requirements check so that site admins are warned about a (temporary) incompatibility with Page Manager.

  • phenaproxima committed 5c2ff56 on 8.x-1.x
    Issue #3120388 by phenaproxima, zseguin: EntityRouteProvider breaks...
phenaproxima’s picture

Status: Needs review » Fixed

OK -- I'm pretty happy with this change, and I'd rather not spend much more time iterating on it. Avanti! Committed and pushed to 8.x-1.x.

Status: Fixed » Closed (fixed)

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