User routed to homepage instead of path of matching agreement

Created on 13 November 2020, over 4 years ago
Updated 15 January 2025, 3 months ago

Problem/Motivation

A user who should be taken to the agreement page is instead being routed to the homepage.

Steps to reproduce

  1. Enable the module
  2. Modify the default agreement to only show on selected pages and add a path like /test-path for the agreement to show on
  3. Login with a different browser using a user who should be forced to accept the agreement
  4. Visit /test-path
  5. The user is redirected to the site's homepage instead of the target agreement

Proposed resolution

My guess is that there is an infinite redirect or competing code on our site that ends up causing the user to land on the homepage. I tested bumping up the priority of the event subscribing code in `AgreementSubscriber.php` to 100 and that seems to have fixed it consistently:
$events[KernelEvents::REQUEST][] = ['checkForRedirection', 100];

Remaining tasks

- Write a patch for Drupal 8

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ’¬ Support request
Status

Closed: duplicate

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States malik.kotob

Live updates comments and jobs are added and updated live.
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