Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What if someone already has custom_context_classes set? #2

Open
mudrd8mz opened this issue Jan 29, 2022 · 3 comments
Open

What if someone already has custom_context_classes set? #2

mudrd8mz opened this issue Jan 29, 2022 · 3 comments

Comments

@mudrd8mz
Copy link

I am not sure we should set custom_context_classes like this in

set_config('custom_context_classes', serialize($customcontexts));
and unset it upon uninstall.

Imagine a site that already makes use of this feature and they have some custom contexts defined. We could easily either overwrite their existing values, or (if they have it defined in config.php), this our DB-only setting might not work.

I believe this feature was added with implicit assumption that custom context levels would be added manually via editing config.php only. I would personally prefer that as a safer and cleaner solution.

@mudrd8mz
Copy link
Author

Especially as the plugin needs two other flags be set in config.php anyway.

@laurentdavid
Copy link
Contributor

Yes, that's fine with me. I did not think about it this way.
So, my understanding is that should rather not set the config in the install.php at all and add some instructions in the README on how to set it up ?

@mudrd8mz
Copy link
Author

Exactly, I believe it would be much better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants