Flagging cancel link redirects to wrong path when using confirm form

Created on 5 May 2023, almost 2 years ago

Flagging cancel link seems to redirect to wrong path when using confirm form, when you have the website installed in subfolder.

For example, I got site installed in domain.com/a/b/c/. When I use the confirm form for flagging and whenever I use the cancel button after clicking flag/unflag link, the redirect takes me to domain.com/a/b/c/a/b/c/<correct-path>. So it adds the subfolders where the site is installed to the redirect path again, when it should just use Drupal path.

When I hover over the initial flag/unflag link, I can see the ?destination path is set to ?destination=/a/b/c/<correct-path>, which is probably why the redirect ends up adding the folders again in the URL. If I manually remove those values from ?destination and just leave plain Drupal path there (like ?destination=user/1 instead of ?destination=/a/b/c/user/1), everything works fine.

I would assume this doesn't happen when site is installed in domain root.

🐛 Bug report
Status

Active

Version

4.0

Component

Flag core

Created by

🇫🇮Finland phonkala

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

Comments & Activities

  • Issue created by @phonkala
  • 🇫🇮Finland phonkala

    Actually now I started thinking this might actually be core issue, as I see same behaviour after installing Groups module. Clicking any of the group action links sets the ?destination part in URL into ?destination=/a/b/c/<correct-path> too.

    Maybe someone more familiar with Drupal could check/answer to this easily?

Production build 0.71.5 2024