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.

Issue fork samlauth-3424834

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Rishi Kulshreshtha created an issue. See original summary.

rishi.kulshreshtha’s picture

Assigned: rishi.kulshreshtha » Unassigned
Status: Active » Needs review
mdyoung3’s picture

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

mdyoung3’s picture

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

MisterG0’s picture

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

roderik’s picture

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.

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

tvalimaa’s picture

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.

japerry’s picture

Status: Needs review » Needs work

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...
roderik’s picture

Assigned: Unassigned » roderik

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.

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

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

vladimiraus’s picture

Status: Needs work » Needs review

Updated to cater for all known properties.

jannakha’s picture

Status: Needs review » Reviewed & tested by the community

tested
good to go

vladimiraus’s picture

burak.ikiler’s picture

StatusFileSize
new772 bytes

I created a simple patch based on 8x.3.10.
Current issue is there is no autmap_uid property on $row but it iseems $row->uid is available and can be used.

sassafrass’s picture

Patch fixed the issue for me.

  • roderik committed 621dde9f on 8.x-3.x
    Issue #3424834: Error encountered when accessing SAML authentication...
roderik’s picture

Status: Reviewed & tested by the community » Fixed

This has grown too complicated to administer properly to everyone's satisfaction:

In the end,

  • I re-investigated my old code, and improved it so that it doesn't rely on hardcoded alias names at all - in externalauth #3503865: Improve views integration
  • I stripped code from this module as far as possible (as long as #3503865 is not committed to a released version yet) and committed that. (I did include the change that is also in patch #17 == the #3488858: Authmap view is breaking - admin/config/people/saml/authmap MR. While investigating, I saw that users_field_data_authmap_uid is neither necessary, nor theoretically correct. If that causes issues for anyone: comment.)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.