I have a paragraph of type "rich text" which has a single long text field attached. This paragraph type is referenced by another paragraph field in a basic page content type. The form display of this field is preview. I have enabled the preview display mode for the rich text paragraph and have set the formatter of the text field to be smart trimmed. This results in a WSOD with message "The website encountered an unexpected error. Please try again later.". Switching back to the standard trim and I'm able to view the node edit screen again. Looking in the logs I see this as a potential culprit:
Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: No link template 'canonical' found for the 'paragraph' entity type in Drupal\Core\Entity\Entity->toUrl() (line 214 of /var/www/hdmicrosite/web/core/lib/Drupal/Core/Entity/Entity.php).
I've seen a few posts like this now and it's never been the paragraphs module at fault it seems...
Comments
Comment #2
markie CreditAttribution: markie at Mediacurrent commented@vaccinemedia Can you retest against the development release? I just added a patch that addresses when a link is missing and the error you are seeing is similar.
Comment #3
vaccinemedia CreditAttribution: vaccinemedia at CTI Digital commented@markie I've updated to the dev you mention and I am now able to view paragraphs in preview mode in the backend / node edit screen with the rich text smart trimmed. Thank you for the speedy fix! Awesome :)
Comment #4
vaccinemedia CreditAttribution: vaccinemedia at CTI Digital commentedPopping into needs review until a couple more people have tested the issue
Comment #5
markie CreditAttribution: markie at Mediacurrent commentedMoving to active until a patch or change needs to be reviewed.
Comment #6
ultimikeFirst off - thanks for the most outstanding issue title - made it super-easy to find this issue.
Anyway, I was having the exact same issue using 8.x-1.0, updated to the latest -dev release, and all is looks fixed.
thanks,
-mike
Comment #7
ruloweb CreditAttribution: ruloweb at Media.Monks commentedThat commit solves my issue too. I have a paragraphs and enabled the Smart Trim for the Token View Mode, and when I was displaying one of the paragraph' field had the same Fatal Error.
This kind of issue was introduced in Drupal 8.2.x, I have seen a few of these missed 'canonical' links.
I think we can mark this as fixed.