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

appsettings.json configuration is not taken into account #15311

Conversation

lampersky
Copy link
Contributor

fixes #15310
and maybe #14050 (it would be good to check @Piedone)

For now I've marked a few methods as obsolete, but IMO they can by removed, because they are useless.

/cc: @sebastienros

Copy link
Contributor

This pull request has merge conflicts. Please resolve those before requesting a review.

@ns8482e
Copy link
Contributor

ns8482e commented Feb 13, 2024

OC allows some settings to be modified by Admin UI, it's by-design default behavior.

To use some of the configuration from appsettings.json you need to explicitly opt-in by calling the respective extension method on your Program.cs

@hishamco
Copy link
Member

@lampersky when these configurations have been broken I remember they were working as expected, @Piedone correct me if I'm wrong. Unless something updated since then

@lampersky
Copy link
Contributor Author

@hishamco I already answered in the main issue, but here is the copy, so you don't need to jump back and forth:

I have to admit something to you guys, I've never ventured into that part of the documentation :-P

I mistakenly assumed that it should work like for other configurable modules: OrchardCore_Apis_GraphQL, OrchardCore_Media_Azure and many others. The configuration from the appsettings.json file is taken into account automatically, you do not need to activate it additionally by calling any dedicated extension methods.

So, thank you @ns8482e, @Piedone and sorry for getting you involved unnecessarily. Maybe I was too quick into preparing the fix.
If you guys will decide to reject the PR, let me know and I will extract this part which solves #14050 into another PR.

@Piedone
Copy link
Member

Piedone commented Feb 14, 2024

Let's keep the "why" under the issue (#15310) please, so we can focus on the "how" here.

Copy link
Contributor

This pull request has merge conflicts. Please resolve those before requesting a review.

@Piedone
Copy link
Member

Piedone commented Apr 10, 2024

Closing this since the linked #15310 issue is closed now too.

@Piedone Piedone closed this Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

configuration stored in appsettings.json is not taken into account
4 participants