Hi,

I created a eva display view for a content type and attached that to the paragraph display. I added that paragraph to a content type. when I load (node/{nid}) of the content with paragraph added, I am getting below error. That error is, because if the paragraph entity does not have a canonical url.

Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: No link template canonical found for the paragraph entity type in Drupal\Core\Entity\Entity->toUrl() (line 224 of core/lib/Drupal/Core/Entity/Entity.php). Drupal\eva\Plugin\views\display\Eva->getPath() (Line: 2034)

Comments

saranya ashokkumar created an issue. See original summary.

saranya ashokkumar’s picture

StatusFileSize
new702 bytes

Attached patch for this issue. Please Review!!!

saranya ashokkumar’s picture

Status: Active » Needs review
ahebrank’s picture

Looks OK to me. While you're at it, can you make the default toUrl() parameter explicit:

$uri = $current_entity->toUrl('canonical');

to hint why we're checking that link template?

saranya ashokkumar’s picture

StatusFileSize
new713 bytes

ahebrank,

Thanks for reviewing the patch. By default, toUrl() function has argument as "canonical". So I didn't add it explicitly. Anyway, I updated the patch.

Please Review!

ahebrank’s picture

Status: Needs review » Fixed

Thanks. Merged to dev with a couple code standards tweaks.

Status: Fixed » Closed (fixed)

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