Adding a field to an entity passes a destination parameter that AutoLogout isn't too happy about.

Created on 1 March 2023, almost 2 years ago
Updated 29 February 2024, 9 months ago

Problem/Motivation

Adding a field to an entity throws a warning from the Auto Logout module.

Warning: Undefined array key "destination" in Drupal\autologout\EventSubscriber\AutologoutSubscriber->onRequest() (line 137 of modules/contrib/autologout/src/EventSubscriber/AutologoutSubscriber.php).

Warning: Undefined array key 1 in Drupal\autologout\EventSubscriber\AutologoutSubscriber->onRequest() (line 141 of modules/contrib/autologout/src/EventSubscriber/AutologoutSubscriber.php).

Warning: Undefined array key 1 in Drupal\autologout\EventSubscriber\AutologoutSubscriber->onRequest() (line 148

Steps to reproduce

Add new or existing field to an entity, save the field settings step (or fail validation) and warnings are thrown.

Proposed resolution

There is a patch available that addresses this:
https://www.drupal.org/project/autologout/issues/3301642 🐛 Throws Notice on Login when destination is set Needs work (also referenced from https://www.drupal.org/project/autologout/issues/3336425 PHP8.1 Closed: duplicate )

Direct link to patch - https://www.drupal.org/files/issues/2022-10-27/3301642-10.patch

Remaining tasks

Patch above has been applied and tested, all 3 warnings no longer appear following same steps.

Now just need to apply the patch to Sectors composer.json.

🐛 Bug report
Status

Closed: won't fix

Version

9.5

Component

Code

Created by

🇳🇿New Zealand chroid

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

Comments & Activities

Production build 0.71.5 2024