next-drupal icon indicating copy to clipboard operation
next-drupal copied to clipboard

Preview mode in Drupal has two different states

Open ysvahn opened this issue 3 years ago • 4 comments

Hello, I am facing a weird behavior in Drupal :

When I click the node title directly in the /admin/content list, I correctly access the preview page with the preview iframe in it. But when I try to access it from inside the node (preview button), the Drupal preview is not displayed at all, only the default "Drupal" preview.

I noticed that it only happens on one of our sites, on the one that is working, the links to the preview page are different but both work :

  • Content title URL : https://website.domain/lang/node-slug
  • Preview button : https://website.domain/lang/node/preview/node-id/full?destination=/en/admin/content

On the website where one of the preview link is not working it is the exact same, but the second URL does not work, the preview iframe is just not there.

As always, thanks for the hard work 💪

ysvahn avatar Aug 01 '22 08:08 ysvahn

Do you mean the default Drupal preview button? This is not supported out the box in next-drupal. There's a few workaround to make it work. See also https://www.drupal.org/project/jsonapi_node_preview

The /node/preview/node-id/full path does not render the iframe preview by default.

shadcn avatar Aug 01 '22 09:08 shadcn

Why is it working on the first website then ? It does work using the /node/preview/node-id/full path so what could be the reason ?

ysvahn avatar Aug 01 '22 09:08 ysvahn

Hmm you mean you can see the iframe preview at node/preview/uuid/full?

shadcn avatar Aug 01 '22 14:08 shadcn

Exactly, as weird as it sounds it does show on that page.

ysvahn avatar Aug 01 '22 14:08 ysvahn