Additional test coverage: non-javascript redirect fallback via destination parameter

Created on 23 June 2022, almost 3 years ago
Updated 12 March 2025, 26 days ago

This issue was a duplicate of 📌 [PHP8.1] Deprecated function: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in Drupal\Core\Access\RouteProcessorCsrf->processOutbound() Fixed but the patch included additional test coverage for placing a flag link on an arbitrary page and verifying that non-javascript browsers are redirected back to the original page after setting/unsetting the flag.

The test only patch from #8 should still apply.

Original summary:

Problem/Motivation

The non-javascript fallback link has an empty destination parameter. This mostly only affects integration tests without javascript.

Steps to reproduce

Clicking on an AJAX link on any page other than the flagged entity's canonical route with javascript disabled does not redirect back to the original page.

Proposed resolution

It looks like there's a missing return statement in AJAXActionLink::getDestination() which could be the culprit. I'll create a patch and test that later today.

📌 Task
Status

Needs work

Version

4.0

Component

User interface

Created by

🇬🇧United Kingdom jacktonkin

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024