- Issue created by @SocialNicheGuru
- 🇨🇦Canada leducdubleuet Chicoutimi QC
Same problem here, the configuration page /admin/config/people/accounts cannot be saved on a new opensocial site.
I wonder if this issue should be set to major since we cannot close the site registration by default as it is?
- 🇺🇸United States SocialNicheGuru
as a workaround could we define it in settings.local.php
For example something like
$settings['show_mail_in_messages'] = 0;
- 🇮🇳India prathamesh.save
For workaround you can delete the 'show_mail_in_messages' config value using below methods:
1: drush config:get system.site // Check if this returns the show_mail_in_messages as key if yes execute below command
2: drush config:delete system.site show_mail_in_messages // this will remove the entry from configFor code, I guess need social_user module needs to update, where it is storing the values in 'system.site' this needs to be updated either to module level or "social_swiftmail.settings" in this config so that Drupal will not throw the unsupported key error(As per my research if any contrib module adds any config entry in System config Drupal throws this error).
Something like social_features/social_user/social_user.module:
function social_user_form_system_site_information_settings_submit($form, FormStateInterface $form_state) { $config = \Drupal::configFactory() ->getEditable('social_swiftmail.settings'); $config->set('show_mail_in_messages', $form_state->getValue("show_mail_in_messages")); $config->save(); }
Above code is partial it may help developer to understand.
- 🇬🇧United Kingdom kevster
Im getting this too when I try and save admin/config/people/accounts.
drupal 10.2.5
PHP 8.2.18
open social 12.3.3 - 🇧🇷Brazil viniciusrp
This error happen because we are saving this variable at system.site config and this variable is not declared at schema yaml file.
I fixed it and needs be reviwed.
PR: https://github.com/goalgorilla/open_social/pull/3869 - Assigned to viniciusrp
- Status changed to Needs review
7 months ago 2:09pm 18 April 2024 - 🇬🇧United Kingdom kevster
Many thanks @viniciusrp - Ive applied the patches manually - all good but social_user.install is very different as Im on 12.3.3. I added your lines anyway (sorry Im not a good progammer!)
I still get the error message "Error message 'show_mail_in_messages' is not a supported key." but I am able to save the page now!
- 🇺🇸United States SocialNicheGuru
@kevster I think you do have to take the steps outlined in #4
- Status changed to Fixed
6 months ago 8:22am 21 May 2024 Automatically closed - issue fixed for 2 weeks with no activity.
If you are still experiencing this issue, make sure you remove `show_mail_in_messages: 0` from your system.site.yml, otherwise it will be re-imported and break the form again.