Skip to content

Caching problem cause language error at first load #5

Description

@Peter83

I'm trying to solve a bug with the elgg_set_plugin_setting for "allowed_languages", it suffers of caching problems, continuously deleting and rewriting the plugin setting on the DB, causing also a first load language selection error when the browser language it's different from default one.
I'm debugging with DB table "private_settings" opened to get the point but I'm not able to solve it, it seems that
elgg_register_plugin_hook_handler("all", "plugin", "language_selector_invalidate_setting");
and
elgg_register_event_handler("all", "plugin", "language_selector_invalidate_setting");

are involved in the caching problem, since when commenting this lines the problem disappear.
The language_selector_invalidate_setting is invoked correctly only one time during the hook trigger 'setting','plugin' just before the setPrivateSetting, but the data on the private_settings DB table disappears during the page cycle execution (I guess inside the elgg_trigger_event('init', 'system').
I'm running elgg 1.8.18.
Thank you for help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions