-
Notifications
You must be signed in to change notification settings - Fork 63
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
Constants are working in theory, but ignored in real life #783
Comments
Hello, @i2dcarrasco Could you please copy the info from the Thanks! |
Hello, The status right now without constants is:
After enabling the constants:
It says "bucket accesible" and "set by constants", but when I go to a site to upload any file, I can see this: If I upload any file the upload is done locally instead to the storage. My Wordpress is multisite, I don't know if that can be the problem. The above error is now that I have emptied all the configurations, but after emtying it I was able to see how it was trying to use the stored settings instead the constant provided settings (just like now that is using the empty stored settings). If I go to the settings page in the site were I am trying to upload the files, I can see how the settings are also filled with the correct data like in the network settings page. Best regards. |
No news about this? |
Hello @i2dcarrasco , Thank you for the provided info. We've made a couple of tests on our multisite environment; the constants work as expected. But there are a couple of notes related to this:
Both issues are related to the The source of the issue could be related to your env variables. You pass the constant values using I would suggest focusing on the Could you please try the following:
or
Please let us know the results so we can move further. |
Hello, Thanks for your info, but I have already checked all that things. I know that the childs of the PHP-FPM has its own env variables, and there's an option to control if you want to preserve the OS env variables. We have already setted that option to preserve the current env variables and even we are using env variables to configure other things in the wp-config.php file (all working). Best regards. |
Hello @i2dcarrasco, I think I found the source of the confusion here. In multisite WP, there are global network-wide WP-Stateless settings and each site in the network has its own settings. Suppose I have a WP multisite with
Suppose I have
So, when using multisite WP, please pay attention to the Network Settings as well as the site-specific settings. I hope this can help us to resolve the issue. |
Hello, Not really, that is not the real problem. I am using the same storage for all the sites, so I have set the configuration under the Network settings. The real problem is that those settings are used in all sites even when you are trying to change those settings via constants. The admin panel shows the correct settings set by the constants, but the plugin doesn't respect that configuration and instead uses the "old" settings (the one set by the network settings). Is something like this:
The WP is multisite but all the sites are under the same domain, so I have never configured any setting via "per-site" settings page, all the changes were done in the network page. The problem is what I say above: When the constants are disabled, the network settings are shown in all the sites, used in all sites and that is right, but when constants are set the constants settings are shown in all the sites (which it's correct), but the real settings used by the plugin seems to be the Network settings (which now are not visible under the admin page becuase are overrided by the constants). If the admin page shows an storage name and all the configurations set by constants in all the sites (including the network settings page), and at the same time shows a message saying that there is no storage name set in the settings page, then there is a problem with the way it read the settings because is not considering the constants and it is just looking into the old Network Settings. I don't know if under a clean Wordpress without any stored setting also happens. Maybe the problem only triggers when there are settings stored into the database. Best regards. |
Hello,
I am using this module from a time ago in some Wordpress installations. For now was working because the settings were set directly on the plugin configuration page but now by requirements of our environments I need to set it using constants. The reason is mainly because the DB of the environment will be replaced by the DB in another environment from time to time, so the configuration params will come with that dump (that's a problem).
The problem is that in theory the constants are working because the configuration page shows the settings greyed out and with the correct configurations that I set via those constants, but in real life the settings seems to be ignored and instead is using the database settings.
My constants:
Steps I have follow to trigger the issue:
A summary can be the title: The settings provided by the constans are readed and considered in the settings page but not in the rest of the plugin, so it's not working as expected.
Best regards.
The text was updated successfully, but these errors were encountered: