Conflict with Commerce Checkout: Unable to Skip Redirect on Specific Routes

Created on 12 May 2025, about 2 months ago

Problem/Motivation

When users log in during the Commerce Checkout process, the LoginRedirectPerRole module overrides the intended checkout flow by redirecting users based on their role. This behavior disrupts the checkout experience, especially when login is required mid-checkout. The expected behavior is for the login redirect to be skipped during checkout, allowing the process to continue uninterrupted.

Steps to reproduce

  1. Enable the LoginRedirectPerRole module.
  2. Configure login redirects per role.
  3. Start the checkout process in Commerce as an anonymous user.
  4. Log in during checkout when prompted.
  5. Observe that the user is redirected away from the checkout flow (e.g., to a dashboard or homepage) rather than staying on the checkout page.

Proposed resolution

Add a condition to skip the login redirect when the current route is commerce_checkout.form. This allows the Commerce Checkout process to complete as expected without interruption.

✨ Feature request
Status

Active

Version

1.10

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine vitaliyb98

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024