No link template 'canonical' found for the 'paragraph' entity type

Created on 16 November 2021, about 3 years ago
Updated 16 May 2023, over 1 year ago

Problem/Motivation

I have taken over an older 8.x site and migrated that to 9.2 when I realized that the client had configured a comment type which is attached to paragraph entities. I know this is strange at least. But it causes a crash when going to the comment overview page /admin/content/comment because the commented entities don't have canonical link templates.

Proposed resolution

Check for the canonical link template before creating a url.

🐛 Bug report
Status

Needs work

Version

9.5

Component
Other 

Last updated 2 days ago

Created by

🇩🇪Germany jurgenhaas Gottmadingen

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • I use comments to comment on paragraphs - on Drupal 8 everything worked fine.
    I have the problem described above after upgrading Drupal from 8.9.20 to 9.5.4 i.e. comment overview page /admin/content/comment is not displayed - error mesage:
    Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: No link template 'canonical' found for the 'paragraph' entity type in Drupal\Core\Entity\EntityBase->toUrl() (line 196 of core/lib/Drupal/Core/Entity/EntityBase.php).
    rdf_comment_storage_load(Array) (Line: 877)

    After update #11 core/modules/comment/src/Form/CommentAdminOverview.php - display new error:
    The website encountered an unexpected error. Please try again later.
    Error: Call to a member function toString() on string in rdf_comment_storage_load() (line 264 of core/modules/rdf/rdf.module).
    rdf_comment_storage_load(Array) (Line: 877)

    I will add that all modules have been updated to the latest versions, including depreciated ones.

    Does anyone have any idea to solve this problem?

Production build 0.71.5 2024