Preview broken for content types that use content templates for display
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3560632. --> Reported by: [pameeela](https://www.drupal.org/user/1431110) Related to !701 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>The core preview feature does not work with content templates, on clicking the preview you get:</p> <pre>The website encountered an unexpected error. Try again later.<br><br>AssertionError: assert(!empty($this-&gt;title)) in assert() (line 137 of modules/contrib/canvas/src/Plugin/DisplayVariant/CanvasPageVariant.php).</pre><p>The resulting URL is e.g. <code>/node/preview/{uuid}/full</code> which is not valid. We should disable preview for the content types that we ship with content template displays.</p> <p>We should fix this robustly by having an ECA which always disables preview for a content type as soon as it's opted into a Canvas content template.</p>
issue