The error log reports...
Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: No link template 'canonical' found for the 'paragraph' entity type in Drupal\Core\Entity\EntityBase->toUrl() (line 226 of /web/core/lib/Drupal/Core/Entity/EntityBase.php).
This error appears to be similar to the one mentioned in this core issue.
Of course, linking a paragraph text field to the content is a bit silly and it happened to me by accident when configuring my paragraph display. Simply because the 'link to content' checkbox is enabled by default and I didn't think to uncheck it.
Steps to reproduce
1. Create a simple paragraph type
2. Add a Text (plain) field to the paragraph type
3. Change the display formatter from plain text to title
4. Leave the default settings unchanged - (Display as h2, linked to content)
5. Add this paragraph type to a content type.
6. Create a node, add a paragraph and populate the text field.
7. Save the node and attempt to view it.
8. WSOD
To resolve the issue
1. Edit the paragraph type
2. Edit the display formatter settings
3. Uncheck 'Link to the content'
4. Save the paragraph type
5. The node can now be viewed
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | manage_display.title-link.3081284-4.patch | 2.2 KB | adamps |
Comments
Comment #2
mrpauldriver commentedComment #3
mrpauldriver commentedComment #4
adamps commentedThanks for the bug report. Here is a patch that should fix it. If the entity type doesn't support linking, then the 'link to content' setting will not be shown.
Comment #5
danielcavanagh commentedI'm seeing a different but related error during node preview
The link is generated for a valid entity type (ie. node) but the generation fails because the node doesn't exist yet (and thus can't yet have a URL)
Please see the revised patch
Comment #6
adamps commentedThanks @danielcavanagh. As you say, your have found a different but related error. So I think there should be a separate issue and commit please.
Next step on this issue is for review of #4. @MrPaulDriver please can you confirm this fixes your problem?
Comment #7
mrpauldriver commentedSorry Adam. Yes this fixes problem for me.
Comment #9
adamps commentedComment #10
adamps commentedFor #5 I have raised #3087749: Bug with node preview on newly created node. @danielcavanagh please can you move your patch there and also update the IS to describe the symptoms?