Parameter in samePagePreviewRenderPreview should be uuid and view mode but passed as null and UUID in ajaxCallback function

Created on 15 July 2024, 4 months ago
Updated 24 August 2024, 3 months ago

Problem

Here when I am updating the content the preview first time open correct but after second update when I change the content, preview is updating but the it is showing default template instead of theme template as in PreviewNodeForm.php -> ajaxCallback function -> InvokeCommand for samePagePreviewRenderPreview has wrong parameter passed.

Steps to reproduce

Add/Edit any content type entity and see first time it open the preview correctly but after another change template get change.

Proposed resolution

Make the Call like this in ajaxCallback function.

$response->addCommand(new InvokeCommand(NULL, 'samePagePreviewRenderPreview', [$entity->uuid()]));

🐛 Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

🇮🇳India kanteshhkd Vadodara

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024