The ModerationState entity defines a 'canonical' link in the entity annotation, but doesn't provide a route in yml or a route_provider.

I have attached two patches:
route_provider.patch
This defines a route provider which should make a canonical route, but doesn't seem to work. So this needs debugging and fixing if it's the right options.

no_canonical.patch
This just removes the canonical link from the moderation state entity annotation.

Both of these should fix the issue reported in the multiversion queue (https://www.drupal.org/node/2665668) but only no_canonical.patch seems to work when I test.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

timmillwood created an issue. See original summary.

Status: Needs review » Needs work

The last submitted patch, route_provider.patch, failed testing.

The last submitted patch, route_provider.patch, failed testing.

The last submitted patch, route_provider.patch, failed testing.

timmillwood’s picture

Status: Needs work » Needs review

I think the route_provider.patch isn't working because ModerationState doesn't have a view_builder.

josephdpurcell’s picture

In testing this issue locally, I ran into this issue #2669328: InlineEditingDisabler attempts to run on non-moderatable entities

After resolving that, I can see that the "no_canonical.patch" works. For now, I think the best approach is to simply remove the canonical link.

Even though I don't believe that is the desired solution long term, this avoids WorkBench from breaking in this way.

josephdpurcell’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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