Skip to content

CorePluginsAdmin.setSystemSettings always saves the plugin settings for all plugins #12826

@tsteur

Description

@tsteur

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

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.c: PerformanceFor when we could improve the performance / speed of Matomo.c: PlatformFor Matomo platform changes that aren't impacting any of our APIs but improve the core itself.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions