xperseguers / t3ext-ig_ldap_sso_auth

TYPO3 Extension ig_ldap_sso_auth. This extension provides LDAP and SSO support for TYPO3.

Home Page:https://extensions.typo3.org/extension/ig_ldap_sso_auth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined array key "ig_ldap_sso_auth" in ...ModuleController.php line 76

cstrizzolo opened this issue · comments

I have upgraded a TYPO3 site using ig_ldap_sso_auth from TYPO3v10 to TYPO3v11 and from PHP 7 to PHP 8.1.
I have also upgraded ig_ldap_sso_auth from version 3.6.0 to 3.7.0.
After the upgrade, I cannot access the LDAP/SSO tab from the left menu column of the BE any more.
When I try, the following error pops up:

503
Oops, an error occurred!

PHP Warning: Undefined array key "ig_ldap_sso_auth" in /.../typo3conf/ext/ig_ldap_sso_auth/Classes/Controller/ModuleController.php line 76

Any hints?

I had the same problem and also intended to create an issue.

is_array($GLOBALS['BE_USER']->uc['ig_ldap_sso_auth']['selection'])) failed because the user config didn't have that key yet.

I removed && is_array($GLOBALS['BE_USER']->uc['ig_ldap_sso_auth']['selection']) from line 76 and the whole line 77 temporarily, and the missing value(s) was added to the user config after accessing the LDAP/SSO module from the left menu column of the BE.

If the user hasn't accessed the BE module before it should default to the overview.

Thanks for your reply.
Your suggestion has made me go one step ahead, but now I have a different problem.
When i click on the LDAP/SSO tab, the following message gets displayed:

No Configuration Records

This module cannot be used until you create at least one configuration record. Please refer to the administrator manual for further information.

Click here to create a configuration record.

A configuration record is actually present in the tx_igldapssoauth_config table of the database. It is the one that was already available before upgrading the whole thing. This is a first strangeness.

However, a second strangeness pops up if I click on the "Click here to create a configuration record" link. In this case the following error gets displayed:

503
Oops, an error occurred!

PHP Warning: Undefined array key 0 in /.../typo3conf/ext/ig_ldap_sso_auth/Classes/Form/Element/LdapSuggestElement.php line 51

Any hints?

Please switch to master branch and report if it helps.

Hi Xavier,
your patch seems to have fixed my original problem.
However the problem I reported earlier today is still there.
Do you prefer me to open a new issue dedicated to that?

Claudio

Hi Claudio, which other problem? The one with ModuleController.php? It's supposed to be fixed with a1a86be

No, the one with ModuleController.php is fixed by your patch. Thank you for that,

The problem that still exists is this one:

#156 (comment)

It happened to me after the problem with ModuleController.php was fixed. Maybe it is unrelated, though.

Did you pull again? I committed twice in relation with that ticket... and even did another commit afterwards, related to another ticket.

Sorry, my mistake. Thank you very much.
I have just pulled again.
The problem is slightly different now.
The existing configuration from the tx_igldapssoauth_config table of the database is not found yet:

No Configuration Records

This module cannot be used until you create at least one configuration record. Please refer to the administrator manual for further information.

Click here to create a configuration record.

However when I click on the "Click here" link, the error I got earlier does not appear any more and I am given the possibility to define a new configuration record.
I could try that, of course.
But IMHO it would be preferable to understand why the existing configuration record does not get found.

Please debug then because I see no reasons why your existing configuration is not found unless you deleted it or marked it as hidden... but this will be another ticket if really there's a bug.

Just in case, these are the contents of the tx_igldapssoauth_config table.

config.txt

it shows it's hidden...

fix by going to Web > List and editing from there (on root, pid=0)

You're right!
The hidden flag must have been changed at some point.
Problem solved, then.
Thank you very much!