Error encountered when accessing SAML authentication mapping configuration page

Created on 1 March 2024, 4 months ago
Updated 28 June 2024, about 13 hours 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

Needs review

Version

3.0

Component

Code

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 4 months ago
    Waiting for branch to pass
  • Issue was unassigned.
  • Status changed to Needs review 4 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.

Production build 0.69.0 2024