Orchard Core 1.5.0, adding Feature Profiles support to Auto Setup - This week in Orchard (11/11/2022)

Gábor Domonkos's avatar
Admin UI, Announcement, Localization, Documentation, This week in Orchard

We are thrilled to announce that Orchard Core 1.5.0 is now available! Check out this post to know everything about the latest release of Orchard Core! Now let's see the newest features and editions of the current release that we will continue the whole month! Let's get started!

Orchard Core updates

CultureInfo should not depend on local computer settings

When the library sets the culture using the new CultureInfo(culture), you can get unexpected results if this is also the system's culture and data formats were customized. This could be a problem if the server wants one data format for internal administrative use that's different from the culture's canonical format.

For example, you have an en-US server with a date format set to ISO 8601. Then if you want to display a date in Orchard Core with the site set to American locale, it will display it using ISO 8601, which is not what you'd expect. The site's internationalization should not depend on the local format settings.

This repro assumes you have Windows 10 with en-US region settings:

Windows 10 with en-US region settings

Steps to reproduce the behavior on Windows:

  1. Go to /Admin/Settings/Localization and make sure your site is en-US.
  2. Create a new view that contains @T["Date: {0:d}", new DateTime(2022, 02, 21, 12, 0)].
  3. Navigate to it, you will see Date: 2/21/2022.
  4. Go to Start Menu > Settings > Time & Language > Region > Change data formats.
  5. Change the Short date to "2017-04-05".
  6. Restart the server.
  7. Visit the same page again, you will see Date: 2022-02-21.

And as you may guess, the expected behavior is that you should still see: 2/21/2022.

This means that from now on, you can use a new option coming from appsettings.json (IgnoreSystemSettings under the OrchardCore_Localization_CultureOptions section), which is about setting whether to ignore the system culture settings or not.

The new IgnoreSystemSettings option

Adding Feature Profiles support to Auto Setup

The issue here was that the Auto Setup doesn't support Feature Profiles. The Feature Profiles feature allows the Default tenant to create Feature Profiles which can restrict the features available to a tenant with Feature Rules.

Let's say you want to use Auto Setup to set up tenants automatically. You set the FeatureProfile property (like for ShellName, SiteName... "FeatureProfile": "standard-tenant") for a tenant as, it is used by Feature Profiles in Shell Settings. The feature profile is not used for tenant settings, only if you manually configure it from the Default tenant's admin, but the Auto Setup should apply the configuration.

If you check out the documentation of the Auto Setup feature, you can see that now you can optionally pass the name of the feature profile used by default. Note, it's only applicable if the Feature Profiles feature is used.

Auto Setup now supports Feature Profile

Add styles for common ASP.NET validation classes

Currently, when we are using common HTML for validation the styles are not applied correctly. Here is an example of code:

<div class="mb-3" asp-validation-class-for="DisplayName">
<label asp-for="DisplayName">@T["Display Name"]</label>
<input asp-for="DisplayName" class="form-control w-md-25" autofocus />
<span class="hint">@T["Name of the type as it will be displayed on screens."]</span>
<span asp-validation-for="DisplayName"></span>
</div>

Validation errors before using ASP.NET validation classes

The <span asp-validation-for="DisplayName"></span> text should be displayed in red. This is because we are missing class styles for field-validation-error.

Also, the <div class="mb-3" asp-validation-class-for="DisplayName"> doesn't have any visual distinction. This is maybe because we don't have any class styles for has-validation-error.

We should at least provide default styling for these even though it might look "different". Also, at the same time, we should probably make sure that we are consistent in the way that we are implementing these validations throughout the entire Orchard Core admin forms at least.

And here, you can see a screen with the updated styles:

Validation errors after using ASP.NET validation classes

News from the community

Orchard Core 1.5.0

Orchard Core 1.5.0 is now available! If you open up nuget.org and search for the OrchardCore.Application.Cms.Targets package, you will find the updated version of Orchard Core!

There is a new page in the documentation with the breaking changes. Upgrade your solution to 1.5.0 now! Feel free to drop on the dedicated Gitter chat and ask questions or use GitHub Discussions!

Orchard Core 1.5.0 release breaking changes

Orchard Harvest 2023

For those who are too young to remember, we had Orchard conferences, called Orchard Harvest. And the conference website was available under orchardharvest.org, but unfortunately, it's not anymore. The last one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference.

The point is that we should really think about organizing the next one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part. If you have any feedback or you are looking forward to having a Harvest again, please share your opinion with us by filling out this survey about the upcoming Orchard Harvest!

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 383 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course.

Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here!

If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

No Comments

Add a Comment