Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After module installation I can't set both the "SMTP Port" and "Use encrypted protocol" fields because they are disabled.
The warning "Disabled fields are overridden in site-specific configuration file" is shown on the page (before and after module activation).
I've tried both with and without the patch "0001-Issue-2819793-Can-t-send-mail-Non-existent-service-s.patch" which is not included in the beta1.
I've got a multilanguage site with D8.2.2. No error messages in the logs.
In another instance I've got this module fine with the SMTP module patched. I really need to enable it in this one.
Comment | File | Size | Author |
---|---|---|---|
#49 | 2826189-48.patch | 8.98 KB | Qusai Taha |
#47 | 2826189-47.patch | 7.37 KB | Qusai Taha |
#45 | 2826189-45.patch | 7.18 KB | Qusai Taha |
#39 | removed_config_override_logic-2826189-39.patch | 8.82 KB | slydevil |
Comments
Comment #2
@baux CreditAttribution: @baux commentedI've tried to install old versions from backups, and I can configure these parameters if the multilanguage modules are not installed on the site...
After some investigation I've seen that the issue is available just if I change the "Selected language" in "Detection and selection" from "Site's default language (English)" to another one (e.g. "Spanish"). If I come back to "Site's default language (English)" I can properly configure the module, and (finally) if I change to Spanish, I can still send mails and have the right configuration of the site.
These are the steps to manually correct the problems (if someone needs this configuration), but I think that the bug should be correct in the code.
Thanks in advance
Comment #3
tuhongwei CreditAttribution: tuhongwei commentedI have the same problem
SMTP module is INACTIVE.
Disabled fields are overridden in site-specific configuration file.
Comment #4
tuhongwei CreditAttribution: tuhongwei as a volunteer commentedSMTP module is active.
Disabled fields are overridden in site-specific configuration file.
Comment #5
labboy0276 CreditAttribution: labboy0276 commentedI am still getting this error even after trying the solution in #2.
Comment #6
arnoldbird CreditAttribution: arnoldbird commentedI'm seeing this issue in the beta2 release. I don't know what multilanguage modules @baux is referring to in #2. I don't have any such modules installed. My install is fairly recent and I don't have a lot of contributed modules installed.
Comment #7
arnoldbird CreditAttribution: arnoldbird commentedChanging the version back to the dev branch because the issue I'm seeing is much more minor. I am seeing the "Disabled fields are overridden" message but no fields are actually disabled in my case. In fact there don't seem to be any problems with the module at all in my case, other than the appearance of this message. In my case this is a minor bug.
Comment #8
@baux CreditAttribution: @baux commented@arnoldbird: I'm talking about core multilanguage modules. I've got a site with 2 languages (english and spanish) and the problem disappeared when changed the config such as in #2. The problem is that after this change I've seen some major problems in the site...
I really need to send mail for this site... If not possible with this module, someone knows how to do it in another way?
TIA
Comment #9
@baux CreditAttribution: @baux commentedA few ways to temporary solve this problem...
Surfing the Drupal database I found 2 fields that contains the smtp.config in the config table: the first related to the default configuration, and second one to the spanish language.
The Spanish view is the default and I was accessing to the SMTP configuration using the Spanish language. Access to the configuration to the English view (SITE/en/...) shows all fields enabled and the configuration can be properly edited.
By the way, the message "Disabled fields are overridden in site-specific configuration file." still appears in both views.
I've tried to delete the registry associated with the Spanish lang in the database; after that, it's possible to edit the configuration also in the Spanish view (but I still have the message).
In the Spanish data file containing the configuration I notice the following:
Probably the system has translated and stored the "standard" word to Spanish. the "s:9" indicates that this word in long 9 bytes (2 bytes for the "á" char)... changing "smtp_protocol";s:9:"estándar" to "smtp_protocol";s:8:"standard" or "smtp_protocol";s:3:"ssl" should works too...
Remember to flush all caches after that...
The problem have to be changed in the installation process... my point of view is that these values have not to be modified in different languages and it should be configured once per site, and as I mention before, the message is still displayed.
Comment #10
apermuy CreditAttribution: apermuy commentedSMTP woks fine for me in this context: Drupal core: 8.2.7 with Galician language as default site language , Mail System 8-x.4.1 and SMTP 8.x-1.0-beta2+5-dev running in a Ubuntu 16.04.02 server with PHP version 7.0.15 and using Mailjet as mail provider. Remarks about my configuration:
Comment #11
pnagornyak CreditAttribution: pnagornyak commentedThe problem is in smtp.schema.yml, if you don`t need different configuration for each language please check related issue.
Comment #12
estoyausente@pnagornyak are right, the problem is in the schema, the config fields are configured as a text in place of string, the issue is resolved here:
https://www.drupal.org/node/2865696
but the patch is not commited yet. Can you test with this patch and tell us if your module works with it?
Comment #13
hungry_mind CreditAttribution: hungry_mind commentedI've got the same problem with disabled fields being 'SMTP port' and 'Use encrypted protocol', in a 8.3.7 bi-lingual site. Although the SMTP module is active, emails cannot be sent via the contact form.
I applied the patch manually (converting the required 'text' fields to 'string'), I uninstalled the SMTP module and re-installed it and finally I was able to edit the SMTP port (still getting the "Disabled fields are overridden in site-specific configuration file." message).
Nevertheless, the site still is unable to send email via the contact form, using the SMTP mod.
Has there been any solution lately?
Comment #14
estoyausente@hungry_mind Are you using the latest dev version or the beta-3?
Comment #15
hungry_mind CreditAttribution: hungry_mind commentedI am using the smtp 8.x-1.0-beta3 version.
Comment #16
estoyausentePlease use the last dev version. As you can see, SMTP for D8 are under development and a stable version is not release yet. I'm using the last version and I don't have problem sending mails in two languages :S
(And please, stop editing your comments when you already have an answers, I could see three different versions of your comment and is a little bit difficult follow the thread. I suggest you in this kind of cases create another comment with the extra information.)
Regards!
Comment #17
hungry_mind CreditAttribution: hungry_mind commented@estoyausente, thank you for the tip.
I tried to uninstall the module, the software reports that it was uninstalled, but I still see it listed in the modules list, so it is only disabled. When I try to install the dev version, I get the message that the SMTP module is already installed. I tried to rename the 'public_html/modules/smtp' folder with no result. I have also cleared the cache, but again, no result.
How could I get rid of the smtp module completely? It seems a really buggy module, it cannot be uninstalled either.......
Comment #18
estoyausenteD8 doesn't have a disable mode. I think that you can try:
I had problem once when I try to uninstall a module when the install code has been changed. Drupal try to remove a field that "X" type but the current field type is "Y" and the uninstall process finished with error. In this case I had to change my code to the last version, uninstall it and them install again.
Another action that you can try is execute drush entity-updates to update the schema before uninstall it (or maybe with this you won't have to uninstall...).
Comment #19
hungry_mind CreditAttribution: hungry_mind commented@estoyausente, you wrote:
Regarding the 1st step, I have already had the beta3 version installed, that's why I want to uninstall it.
Regarding the 2nd step, that is my problem. I cannot uninstall it. Module still exists in the modules list, without the 'Configure' option.
Regarding the 3rd step, how do I remove it from the database? Which table/tables, which row/rows? Are there any guidelines concerning it's database locations?
Comment #20
Mahima Prachandia CreditAttribution: Mahima Prachandia commentedI was also facing the same issue for my multi-lingual site. I did following steps :
1) I just uninstalled it via drush :
drush pm-uninstall smtp
2) Then I updated the module.
3) Then I applied the patch smtp-disabled-fields-overridden-site-specific-2826189-20-d8.patch
4) Install the module.
5) Cleared the cache by drush cr
6) Configure the SMTP module for the non-default language (fr).
7) Then I configured the module for the default language (en).
8) Sent a test mail in both the language.
Its working fine !
Thanks,
Comment #21
hungry_mind CreditAttribution: hungry_mind commentedMahima Prachandia, thanks for the tips, but I am still having the same problem - after having executed the drush command which reports the module as uninstalled, the module is still listed in the modules list, (without the 'Configure' link, ie, it is inactivated, but not removed from the database, it seems).
Also, I have a question, regarding the 2nd step in your procedure. Since the module is uninstalled in the 1st step, how can it be updated in the 2nd step? Would you mean installing the dev version?
Comment #22
slydevil CreditAttribution: slydevil commentedI think the answer is to remove the disabling of fields altogether. The method of notifying the user of config overrides has been discussed at length here: https://www.drupal.org/project/drupal/issues/2408549. There are patches to apply to enable the notification of overridden config values.
I've attached a new patch, which removes the isOverridden function and all checks made by it.
Comment #23
slydevil CreditAttribution: slydevil commentedHiding the other patch, since it actually for another issue.
Comment #24
SivaprasadC CreditAttribution: SivaprasadC as a volunteer and at DrupalPartners for Innoppl Technologies Pvt. Ltd commented@slydevil
Thanks for the patch. The patch is not applying for 8.x-1.0-beta4. So, I have re-rolled the patch. PFA
This patch helps me to solve the warning.
Comment #25
slydevil CreditAttribution: slydevil commentedAlso, there is a module to show config overrides while #2408549: There is no indication on configuration forms if there are overridden values is being worked through - https://www.drupal.org/project/config_override_warn
Comment #26
Chris Matthews CreditAttribution: Chris Matthews as a volunteer and at City of Oaks Design commentedThe patch in #24 does not apply to 8.x-1.x-dev.
Comment #27
jedsaet CreditAttribution: jedsaet as a volunteer commentedRe-rolled against dev.
Comment #28
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commentedTest is failing
Comment #29
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commentedComment #30
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commentedComment #31
kpoornima CreditAttribution: kpoornima as a volunteer and at Melity commentedRe-rolled against dev (8.x-1.x-dev.).
Comment #32
tiikeri CreditAttribution: tiikeri commentedGood news SMTP users: I applied the #31 patch and it works! ;-)
Be more specific: I have a multilanguage drupal 8.8 site on PHP 7.3 and MariaDB 5.5 on Apache 2.4 and incurred in the same warning as other "Disabled fields are overridden in site-specific configuration file" and couldn't send e-mails. After applying the patch, I send a test e-mail and received it.
Thank you guys, you're awesome.
Comment #33
lolandese CreditAttribution: lolandese at Cognizant Technology Solutions commentedPosting a link to a change record introduced in Drupal core 8.5.0. Seems related and might impact the chosen solution.
New method \Drupal\Core\Config\Config::hasOverrides($key) determines if a configuration object or any of its keys are overridden | Drupal.org
The issue title is a bit confusing, just being the warning shown. That seems like expected behaviour, looking at:
That is called in any case, not being wrapped in a conditional. So, it is always shown. Based just on that, I would say the issue would qualify for a 'Closed (works as designed)' status. If not, the issue title and description should be adjusted to better describe the experienced issue.
In any case, the module's function isOverridden($name) could now be replaced by Drupal core's hasOverrides($key), as mentioned in the change record, but that would probably justify a new issue.
Comment #34
justkristin CreditAttribution: justkristin commentedSorry, all -
Am trying to get the 8.x-1.0-rc4 version patched (on D8.9.2) but only some of the hunks are caught:
I can't fix the email problem our site is currently having - looks like the update I did to the module 4 days ago killed settings? At any rate, how do I fix things from here? Sorry!
Comment #35
justkristin CreditAttribution: justkristin commentedAll -
I have created a patch based on the one in #31, but made diffed against smtp-8.x-1.0-rc4. It worked without missed chunks.
Comment #36
justkristin CreditAttribution: justkristin commentedSuper-rookie missing paren mistake in #35. Sorry :(
Comment #37
justkristin CreditAttribution: justkristin commentedOk. Final version. Found a problem with another paren. I swear. Installed and working, for me, tho.
Comment #38
slydevil CreditAttribution: slydevil commented#37 does not apply to rc4 for some reason:
Comment #39
slydevil CreditAttribution: slydevil commentedRe-rolled.
Comment #40
slydevil CreditAttribution: slydevil commentedComment #41
slydevil CreditAttribution: slydevil commentedComment #42
Pene CreditAttribution: Pene at Cheppers commentedRTBC - The "Disabled fields are overridden in site-specific configuration file" warning disappeared with #39 - So it works with Drupal 9.3.2 (minimal profile) + smtp 8.x-1.0
I'm also able to edit "both the "SMTP Port" and "Use encrypted protocol" fields".
Comment #43
lhridley CreditAttribution: lhridley as a volunteer and at FRUITION commentedSetting this back to "Needs Work" because:
Overriding configuration in settings.php should present a message to the user that "disabled fields are overridden in site-specific configuration file", and the overridden fields should be disabled as an indicator to the user that these values need to be adjusted in settings.php instead of through the Admin UI. This is standard behavior Drupal expected behavior.
Applying this patch when settings are actually overridden in settings.php does not apply a visual indicator, leaving a user to think that configuration values presented through the Admin UI can actually be overridden in that manner, when in actuality they cannot.
Tested using Drupal 9.3.3, with module version 8.x-1.0 and patch applied and multilingual support enabled, with config values overridden in settings.php.
Comment #44
xjmComment #45
Qusai Taha CreditAttribution: Qusai Taha at Vardot commentedRe-roll with the latest version
Comment #46
proweb.ua CreditAttribution: proweb.ua commented#46
8.x-1.2 and last dev
Could not apply patch! Skipping. The error was: Cannot apply patch
Comment #47
Qusai Taha CreditAttribution: Qusai Taha at Vardot commentedRe-roll the patch
Comment #49
Qusai Taha CreditAttribution: Qusai Taha at Vardot commentedComment #50
xeM8VfDh CreditAttribution: xeM8VfDh commentedI just installed version 8.x-1.2 on Drupal 10.2.1
I configured it and the test email worked, hooray!
But I do see this "Disabled fields are overridden in site-specific configuration file" message at the top of the config page and have no idea what it means or if I should ignore it.