- First commit to issue fork.
- last update
over 1 year ago 10 pass - @uri_frazier opened merge request.
- 🇺🇸United States uri_frazier Portland, Oregon
I also was getting the same error originally reported along with the following:
Warning: Trying to access array offset on value of type null in /app/web/modules/contrib/file_mdm/src/Element/FileMetadataCaching.php on line 66 Warning: Trying to access array offset on value of type null in /app/web/modules/contrib/file_mdm/src/Element/FileMetadataCaching.php on line 75
The problem occurs (
SettingsForm.php
) when there is no default/value set in$this->config('file_mdm.settings')
.Also in the code below, splitting off the
save()
function doesn't work as intended.$this->config('file_mdm.settings')->set('metadata_cache', $form_state->getValue(['metadata_cache', 'settings'])); // Only save settings if they have changed to prevent unnecessary cache // invalidations. if ($this->config('file_mdm.settings')->getOriginal() != $this->config('file_mdm.settings')->get()) { $this->config('file_mdm.settings')->save(); }
I've created a proposed solution here:
https://git.drupalcode.org/project/file_mdm/-/merge_requests/23To reproduce this error, try configuring Metadata caching settings while running PHP 8.1.x and on a site that has not no previous Metadata caching settings saved in Drupal config.