Created on 22 December 2024, 30 days ago

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

🐛 Bug report
Status

Active

Version

2.2

Component

Code

Created by

🇯🇴Jordan aya.y

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

Comments & Activities

  • Issue created by @aya.y
  • 🇮🇳India rajdip_755 kolkata

    Hi @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.

  • 🇯🇴Jordan aya.y

    Thank 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.

    • Drupal Version is 10.4.0
    • Database Version 10.5.17-12-MariaDB-enterprise-log
    • PHP Version 8.2.22
    • anonymous_login 8.x-2.2
  • 🇨🇭Switzerland mullzk

    I 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:

    _core:
      default_config_hash: xyz
    langcode: de
    paths: /somepath/
    login_path: /user/login
    message: 'A nice message.'
    

    But when I manually change to

    paths: 
      - /somepath/
    login_path: /user/login
    

    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, 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.

Production build 0.71.5 2024