Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behat error 'Warning: Undefined array key 1' on Moodle 4.5 #734

Closed
abias opened this issue Oct 23, 2024 · 1 comment
Closed

Behat error 'Warning: Undefined array key 1' on Moodle 4.5 #734

abias opened this issue Oct 23, 2024 · 1 comment
Assignees
Labels
affecting 4.5 only Something which only affects Moodle 4.5 bug Something which isn't working

Comments

@abias
Copy link
Member

abias commented Oct 23, 2024

On Moodle 4.5, every now and then a particular Behat error appears:

001 Scenario: Setting: Information banners - Reset dismissed info banner 1          # /home/runner/work/moodle-theme_boost_union/moodle-theme_boost_union/moodle/theme/boost_union/tests/behat/theme_boost_union_contentsettings_infobanners.feature:179
      And I navigate to "Appearance > Boost Union > Content" in site administration # /home/runner/work/moodle-theme_boost_union/moodle-theme_boost_union/moodle/theme/boost_union/tests/behat/theme_boost_union_contentsettings_infobanners.feature:197
        Warning: Undefined array key 1 in /home/runner/work/moodle-theme_boost_union/moodle-theme_boost_union/moodle/lib/behat/classes/behat_session_trait.php line 971

Configuring-the-theme_boost_union-plugin-for-the-Information-banners-tab-on-the-Content-page_I-navigate-to-Appearance-Boost-Union-Content-in-site-administration_boost_union_197

Running the Behat job again mostly fixes the issue, but this should be investigated anyway.

@abias abias added bug Something which isn't working affecting 4.5 only Something which only affects Moodle 4.5 labels Oct 23, 2024
@abias abias self-assigned this Oct 23, 2024
@abias abias moved this to In Progress DEV in Boost Union Planning Board Oct 24, 2024
@abias
Copy link
Member Author

abias commented Oct 24, 2024

This is really strange as the core_sms subsystem which should be initialized here is not related or manipulated by Boost Union in any way.

Looking closer at the initialization of the core_sms\manager, I saw that this is done with di which we manipulate in https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/blob/main/lib.php#L664. However, even if this line is commented, the Behat failure persists.

On the other hand, it seems not to be a Moodle core issue as the Behat failure seems not to happen if the scenario is tested on Boost Core.

The only thing which I could find out in the available time is that the Behat failure will vanish if caches are purged before navigating to the content settings.

I will create a PR for that.

abias added a commit that referenced this issue Oct 24, 2024
@abias abias moved this from In Progress DEV to Ready for REVIEW in Boost Union Planning Board Oct 24, 2024
@abias abias closed this as completed in e9d11d5 Oct 25, 2024
@github-project-automation github-project-automation bot moved this from Ready for REVIEW to Ready for Backport in Boost Union Planning Board Oct 25, 2024
abias added a commit that referenced this issue Oct 25, 2024
@abias abias moved this from Ready for Backport to Ready for Release in Boost Union Planning Board Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affecting 4.5 only Something which only affects Moodle 4.5 bug Something which isn't working
Projects
Status: CLOSED
Development

No branches or pull requests

1 participant