After updating to 10.2 I get a drupal error message saying "'ipless' is not a supported key."

I'm using PHP 8.1

Comments

RgnYLDZ created an issue. See original summary.

orkutmuratyilmaz’s picture

orkutmuratyilmaz’s picture

@RgnYLDZ, can you try these 2 drush commands? They can be helpful, as mentioned here:

drush config:delete system.performance stale_file_threshold
drush config:delete system.performance ipless
rgnyldz’s picture

Nice, seems to be working now.

Great work buddy :)

avpaderno’s picture

Status: Needs review » Active

The error is caused by IpLessSettingForm::checkSettings() which adds to the system.performance configuration object a value that is not defined in the system.schema.yml file, used to validate the configuration object. The configuration validation is what throws the error you are seeing.

$config = \Drupal::service('config.factory')->getEditable('system.performance');

$form_state->cleanValues();
$config->set('ipless', $form_state->getValue('ipless'));
$config->save();

The solution is for this module to use its own configuration object instead of using one used by Drupal core.

avpaderno’s picture

Running drush config:delete system.performance ipless would just temporary fix the issue. After the module settings are changed again from the user interface, the same error will be shown again.

orkutmuratyilmaz’s picture

@apaderno, thanks for detailed explanation.

@Damien Laguerre, can you add a configuration object to this module?

damien laguerre’s picture

To remain compatible with all sites using ipless, I've implemented the hook_config_schema_info_alter to include to system.performance schema the ipless config description.

rgnyldz’s picture

Status: Active » Reviewed & tested by the community
damien laguerre’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.