Error encountered when accessing SAML authentication mapping configuration page

Created on 1 March 2024, 10 months ago

Problem/Motivation

When attempting to access admin/config/people/saml/authmap, the following error occurs:

Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "uid" for route "samlauth.authmap_delete_form" must match "[^/]++" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 209 of core/lib/Drupal/Core/Routing/UrlGenerator.php).

Steps to Reproduce

  1. Attempt to access admin/config/people/saml/authmap.

Proposed Resolution

It is observed that there's no authmap_uid returned in $row. Instead, we should use users_field_data_authmap_uid.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇺🇸United States rishi kulshreshtha

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

Merge Requests

Comments & Activities

  • Issue created by @rishi kulshreshtha
  • Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.4 & MySQL 5.7
    last update 10 months ago
    Waiting for branch to pass
  • Issue was unassigned.
  • Status changed to Needs review 10 months ago
  • 🇺🇸United States mdyoung3

    I'm getting the same issue. It looks like the solution Rishi Kulshreshtha created brings the page back.

  • 🇺🇸United States mdyoung3

    I'm getting the same issue. It looks like the solution Rishi Kulshreshtha created brings the page back.

  • Also ran into this issue and can confirm the change in the linked merge request restores access to the page.

  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    This is because of changes made to externalauth.

    While I don't doubt that this works,

    • I don't know why it works, so I don't know if it will keep working. ($row apparently has two separate properties with the same value. They used to be $row->authmap_uid and $row->users_field_data_authmap_uid. After the update to externalauth 2.0.4, the properties are $row->uid and $row->users_field_data_authmap_uid. OK, but why are there two? Maybe that knowledge will help solve the referenced externalauth issue too. Because it works for me... but... some people are apparently still having issues?)
    • I want to keep the code in sync with externalauth. That means looking at the changes in 2.0.4 and possibly incorporating them. But I'm not sure having uid be the base_field makes sense there, given that it's not necessarily a unique value?

    It may well be that the solution in this MR is the right one, but I want to doublecheck if the 'parent issue' can be closed, first (or at least, that it won't affect us).

    If you want to fix the issue now: downgrade externalauth to 2.0.3. There are no changes since 2.0.3 except for the view (which my view is based on) and gitlab / phpcs.

  • 🇿🇦South Africa MrKennedy

    MrKennedy changed the visibility of the branch 3424834-error-encountered-when to hidden.

  • 🇫🇮Finland tvalimaa

    I have same problem with these versions samlauth: 8.x-3.9 & externalauth: 2.0.5 and that merge request !18 is solving my problem.

  • Status changed to Needs work 6 months ago
  • 🇺🇸United States japerry KVUO

    Probably should wait for the next release of externalauth and up the minimum requirement to that release. That way if you see this error and update samlauth, it'll update externalauth too.

    • roderik committed cee640fe on 8.x-3.x
      Issue #3424834 by japerry, roderik: increase minimum externalauth...
  • Assigned to roderik
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    Thanks, that's a good idea. There's no reason not to update that minimum requirement.

    I'm still keeping this issue open, to think about (including the linked externalauth issue) when I have time.

  • 🇦🇺Australia VladimirAus Brisbane, Australia

    vladimiraus changed the visibility of the branch 3424834-error-encountered-when to active.

  • 🇦🇺Australia VladimirAus Brisbane, Australia

    vladimiraus changed the visibility of the branch 3424834-error-encountered-when to active.

  • Pipeline finished with Success
    29 days ago
    Total: 241s
    #351269
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Updated to cater for all known properties.

  • Pipeline finished with Success
    29 days ago
    Total: 149s
    #351271
  • Pipeline finished with Success
    29 days ago
    Total: 152s
    #351274
  • 🇦🇺Australia jannakha Brisbane!

    tested
    good to go

  • 🇦🇺Australia VladimirAus Brisbane, Australia
Production build 0.71.5 2024