UI Exception / 500 Error when triggering Preview on Content Templates causes persistent state lock
A regression has introduced a Preview button for Content Templates, which was previously hidden. Clicking this button triggers a 500 Internal Server Error API exception. Furthermore, attempting to exit the preview state fails to clear the editor state, resulting in a persistent UI layout lock across all subsequent pages or templates until a hard browser refresh is performed. Technical Impact: Backend: The system executes an unhandled or invalid exception routine when validating the entity bundle type against the preview controller endpoint. Frontend: The application state machine fails to reset or gracefully handle the 500 error state upon executing an "Exit Preview" action. The editor becomes stuck rendering the problematic content template cache tree across global view switching workflows. ``` { "status": "500", "errors": { "message": "For now Canvas only works if the entity is a canvas_page! Other entity types and bundles must use content templates for now, see https://drupal.org/i/3498525" }, "message": "For now Canvas only works if the entity is a canvas_page! Other entity types and bundles must use content templates for now, see https://drupal.org/i/3498525" } ``` Steps to Reproduce : 1. Navigate to the Canvas dashboard. 2. Select any Content Template configuration element to enter its layout editing screen. 3. Observe that a Preview option button is displayed/enabled on the toolbar header. 4. Click on the Preview button. 5. Observe Error Condition A: Open the browser developer tools console and note the 500 (Internal Server Error) response. Depending on your configuration context, a strict system error panel or crash module will also overlay directly on the page layout. 6. Click the Exit Preview action button to attempt to revert to a standard working canvas loop. 7. Observe Error Condition B: The Canvas application layout remains stuck on the broken template layout grid. The visual user interface components fail to synchronize or render the newly requested pages.
issue