acquia / acquia_cms

Low or no-code site building for Drupal within the Acquia Platform.
GNU General Public License v2.0
29 stars 35 forks source link

404 page returned when redirecting from login #1573

Closed hmaruyama closed 1 year ago

hmaruyama commented 1 year ago

Describe the bug I'm using moderation_dashboard and acquia_cms_common module. I don't want to redirect the moderation dashboard page after login. so I unchecked Redirect on login Moderation Dashboard Settings page. When login to site, redirect to non-existent route (/user/{user}/moderation/dashboard) so it shows 404 not found, neither Moderation dashboard page nor account page.

Likely suspicious code: https://git.drupalcode.org/project/acquia_cms_common/-/blob/3.1.2/src/RedirectHandler.php#L124

Here is the situation:

To Reproduce Steps to reproduce the behavior, ideally starting from a fresh install of Acquia CMS:

  1. Run composer create-project acquia/drupal-recommended-project project
  2. Run ./vendor/bin/acms acms:install
  3. Select acquia_cms_enterprise_low_code and then Acquia CMS installed
  4. Create testuser user with administrator role
  5. Move to Configuration > People > Moderation Dashboard (URL: /admin/config/people/moderation_dashboard)
  6. Disable Redirect on login
  7. Logout of the site
  8. Login with testuser
  9. Redirect /user/{user}/moderation/dashboard page and see 404 not found

Expected behavior When disabled Redirect on login checkbox at Moderation Dashboard Settings, it should redirect to account page, not Moderation dashboard.

Detailed error output Please provide as much detail about the error you're seeing as possible. Examples include errors present in the browser, Javascript console, Drush command error output, and server logs in Acquia Cloud.

System information

Additional context N/A

nagwani commented 1 year ago

We will review this one and post our updates!

vishalkhode1 commented 1 year ago

Closing, as this is fixed with Acquia CMS Common: 3.2.3 / 3.1.7.