Trying to access settings page and i keep getting fatal error
TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in implode() (line 56 of /opt/drupal/web/modules/contrib/anonymous_login/src/Form/AnonymousLoginSettings.php).
also no redirection now for anonymous users
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | WhatsApp Image 2024-12-22 at 8.02.43 PM.jpeg | 42.27 KB | aya.y |
Issue fork anonymous_login-3495568
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
Comment #2
rajdip_755Hi @aya.y, I'm trying to replicate this issue with the 8.2.2 version of this module in a Drupal 10.4 setup but the issue is not replicated.
Can you please mention the module version and the Drupal core versions, that will be helpful for replicating this issue and solve accordingly.
Comment #3
aya.y commentedThank you for your replay , this issue happens after i used composer update and i used the older version 8.x-2.1 and it has configuration already added.
anonymous_login.settings.yml
Comment #4
mullzk commentedI can confirm the issue, with drupal 10.4.1 and php 8.3.15
It happens only on Anonymous login 8.x-2.2, reverting to drupal/anonymous_login:2.1.0 solves the issue
We only have one path, so our `anonymous_login.settings.yml` (as exported on anonymous_login:2.1.0, but not changed when updated to 2.2.0) is:
But when I manually change to
then the issue disappears.
So i guess it's somethin about the config-schema, which does not change to a sequence when coming from an older version, perhaps only on Drupal 10, perhaps only when having a single entry (like me) or a config with windows-style-line-endings (like aya.y)
My workaround: changing the config-file to a sequence
I guess its related to #3495893: Warning: foreach() argument must be of type array|object, string given, which occurs under the same circumstances (2.2.0, but not 2.1.0, paths-config in single line instead of list) and is triggered on the same object.
Comment #7
anton4uk commentedSince 8.x-2.2, paths are stored as a list, but sites can still store them as strings.
MR !26:
Comment #9
anton4uk commented