@tsteur opened this Issue on May 6th 2018 Member

Instead, it should only save the plugins for the plugin(s) that is/are being updated. Through the UI, always only one plugin is being updated. Through the API in theory multiple plugins can be updated.

The payload may look like this:

image

So we should only update the plugin settings for plugins that are in the payload. Ideally, we would check if any value was changed for a plugin but this may be quite hard. Instead, it should be fine though to check the plugin names that are updated and then only save those.

This is to prevent possible data loss, not doing unneeded actions that may happen in a "save" method such as here https://github.com/matomo-org/plugin-QueuedTracking/blob/master/SystemSettings.php#L413-L429 and in other plugins.

It is not 100% bug, but classifying it as a bug as it could cause problems.

Same problem should exist for the method setUserSettings

@mattab commented on May 7th 2018 Member

Good find :+1:

This Issue was closed on May 6th 2018
Powered by GitHub Issue Mirror