Closed (fixed)
Project:
GLightbox
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2026 at 08:48 UTC
Updated:
7 Oct 2026 at 09:01 UTC
Jump to comment: Most recent
Both image formatters declare the module-handler and library-discovery services as private. Their inherited DependencySerializationTrait cannot restore these properties after serialization. Calling settingsForm() afterward fails with Call to a member function moduleExists() on null.
settingsForm() on the restored formatter. Both injected services are null, and the call fails.Change the four service properties to protected, following Drupal's serialization guidance. Add a regression test covering both formatters.
Locally tested on Drupal 10 and 11: the regression test fails before the fix and passes afterward.
Review and merge the MR.
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 #3
nick hope commentedComment #6
levmyshkinComment #8
levmyshkin