after enabled the content_translation module:
1. goto admin/store
2. click "Create order" link
3. select "No customer account required."
4. click "Create order" button

will cause this issue:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.uc_order.canonical" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 191 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Drupal\Core\Routing\UrlGenerator->getRoute('entity.uc_order.canonical')
Drupal\Core\Routing\UrlGenerator->generateFromRoute('entity.uc_order.canonical', Array, Array, 1)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('entity.uc_order.canonical', Array, Array, )
Drupal\Core\Url->toString()
content_translation_page_attachments(Array)
Drupal\Core\Render\MainContent\HtmlRenderer->invokePageAttachmentHooks(Array)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jian he created an issue. See original summary.

jian he’s picture

Title: Route "entity.uc_order.canonical" does not exist » Create order fatal error if content_translation module enabled.
Issue summary: View changes
TR’s picture

Status: Active » Needs review
FileSize
510 bytes

Let's see if this works. I didn't test it ...
The entity.uc_order.canonical route is defined in the uc_order entity annotation, but I guess that's not enough ...

jian he’s picture

The /admin/store/orders/{uc_order} is canonical.

jian he’s picture

#2623394: Fix views schemas for uc_order depends on this issue, because the standard views field plugin need usable canonical link to make id link to entity.

jian he’s picture

FileSize
415 bytes
11.22 KB

Remove TODO, because the RouteProvider already provided.

  • longwave committed f39b3d0 on 8.x-4.x authored by jian he
    Issue #2623410 by jian he, TR: Create order fatal error if...
longwave’s picture

Status: Needs review » Fixed

Thanks! Committed #6 without the Views config changes that were previously removed:

+          row_class_special: 1

  • TR committed a337962 on 8.x-4.x
    Issue #2623410 followup: Remove extra whitespace.
    

Status: Fixed » Closed (fixed)

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