"Leave preview?"-Dialog redirects to wrong target

Created on 12 August 2025, 3 days ago

Originally reported in comment of another issue: https://www.drupal.org/project/drupal/issues/3308432#comment-16139164 💬 The link on the Image tag is redirecting to an undefined page from the node preview screen. Active

Problem/Motivation

When in the preview mode of a node, clicking a link opens a dialog notifying the user that he is about to leave the preview. Currently, clicking on "Leave preview" to follow the link redirects to "/node/preview/UUID/undefined". The expected behavior would be a redirect to the actual target of the link.

Steps to reproduce

1. Edit any node.
2. Click the Preview button.
3. Within the preview, click on any basic link or admin links.
4. You are redirected to: /node/preview/UUID/undefined

🐛 Bug report
Status

Active

Version

11.2 🔥

Component

node system

Created by

🇩🇪Germany styx1983

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

Comments & Activities

  • Issue created by @styx1983
  • @styx1983 opened merge request.
  • 🇳🇿New Zealand quietone

    In Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies . Also mentioned on the version section of the list of issue fields documentation. Thanks.

    I tested this on 11.3.x-dev today and was not able to reproduce the problem using the steps to reproduce in the issue summary.

  • 🇦🇺Australia acbramley

    I can't reproduce this on HEAD, what version of Drupal are you running? And what links are you clicking on?

    I've tested with both adding and editing a node and clicking on a toolbar link.

  • 🇩🇪Germany styx1983

    I can reproduce this problem in Drupal 10.4.8 and 11.2.2.

    In Drupal 11.2.3 the problem seems to be fixed, thou I cannot grasp which change solved the issue.

  • 🇩🇪Germany styx1983

    Re-checked with the most basic Core-Installation and everything works fine.

    Our problem seems to be created by another module or by the theme and the provided fix seems only to fix a symptom and not the source of the problem.

    Sorry for the inconvenience.

Production build 0.71.5 2024