Orchard Core 1.8.0¶
Release date: January 2, 2024
In this update, we've introduced several significant changes that may require your attention before upgrading. Additionally, performance-related enhancements have been implemented to optimize your app's scalability, especially when dealing with a large number of tenants.
Breaking Changes¶
The interface OrchardCore.Documents.IDocumentSerialiser has been renamed to OrchardCore.Documents.IDocumentSerializer.
.NET support¶
This release removes support for net6.0 and net7.0. Only net8.0 is supported.
TheAdmin Theme¶
The TheAdmin theme was upgraded to Bootstrap 5.3.2. Here is a list of the breaking changes
- The
bg-primaryclass was changed totext-bg-theme. - The
darkmodetheme is now calleddark. - The
defaulttheme is now calledlight. - By default, the theme is set to
autowhich allows us to use the default device color preference. - Material-icons are no longer included.
- The
DarkModeService.cswas replaced withThemeTogglerService. - The property named
DisplayDarkModeinAdminSettingswas replaced withDisplayThemeToggler. - Bootstrap is no longer compiled in
TheAdmin.css. Bootstrap are loaded independently for performance and maintainability reasons.
Workflow Module¶
A new option for restarting a specific Workflow instance has been incorporated, involving adjustments to both the IActivity and IWorkflowManager interfaces.The following method was added to IWorkflowManager interface.
Task<WorkflowExecutionContext> RestartWorkflowAsync(WorkflowType workflowType, IDictionary<string, object> input = null, string correlationId = null)
The following methods were added to the IActivity interface.
Task OnWorkflowRestartingAsync(WorkflowExecutionContext context, CancellationToken cancellationToken = default)Task OnWorkflowRestartedAsync(WorkflowExecutionContext context)
Navbar¶
The NavbarTop zone is no longer used in the TheAdmin or TheTheme themes. Follow the Navbar details below on how to inject custom menu items in the navbar.
Diagnostics Module¶
The HTTP error views are now in the form of shapes. If you've made customizations to error views within your theme, you should search for BadRequest, Forbidden, NotFound, and Unauthorized views in either YourTheme/Views/OrchardCore.Diagnostics/Diagnostics or YourTheme/Views/Shared and relocate them to YourTheme/Views. Afterwards, append HttpError- to their names. For instance, NotFound.cshtml should be renamed to HttpError-NotFound.cshtml.
Additionally, if you've customized the Error.cshtml view, it should be renamed to HttpError.cshtml since it acts as the default template for error pages.
Infrastructure Changes¶
The following interfaces have been updated to incorporate new asynchronous methods, corresponding to each synchronous method. All synchronous methods have been deprecated and should no longer be utilized.
IStereotypeServiceIStereotypesProviderIRouteableContentTypeProviderIRouteableContentTypeCoordinatorIContentDefinitionServiceIContentDefinitionManagerIContentDefinitionService
Change Logs¶
TheTheme Theme¶
The TheTheme theme was upgraded to Bootstrap 5.3.2. New light and dark modes were added.
Navbar¶
The upper navigation bar has been transformed into a customizable shape, allowing for easy integration of items. The NavbarTop zone is no longer used in the TheAdmin or TheTheme themes. If you wish to add a menu item to the navigation bar, simply create a display driver for Navbar.
As an illustration, we inject the theme toggler into both Detail and DetailAdmin display type using a display driver as outlined below:
public class ToggleThemeNavbarDisplayDriver : DisplayDriver<Navbar>
{
public override Task<IDisplayResult> DisplayAsync(Navbar model, BuildDisplayContext context)
{
return Task.FromResult<IDisplayResult>(
View("ToggleTheme", model)
.Location("Detail", "Content:10")
.Location("DetailAdmin", "Content:10")
);
}
}
Additionally, the follow shapes have been removed
ContentCulturePickerContainerAdminCulturePickerContainer
Navbar Shape for Custom Theme¶
To add the Navbar shape into your own front-end theme, add the following code into your layout.
@inject IDisplayManager<Navbar> DisplayManager
@inject IUpdateModelAccessor UpdateModelAccessor
@await DisplayAsync(await DisplayManager.BuildDisplayAsync<Navbar>(UpdateModelAccessor.ModelUpdater))
To add the Navbar shape into your own back-end theme, add the following code into your layout.
@inject IDisplayManager<Navbar> DisplayManager
@inject IUpdateModelAccessor UpdateModelAccessor
@await DisplayAsync(await DisplayManager.BuildDisplayAsync<Navbar>(UpdateModelAccessor.ModelUpdater, "DetailAdmin"))
Elasticsearch Module¶
Introduced a new option in ElasticSettings that permits the definition of a custom query for the default search. For instance, the following is an example of a search query supporting the fuzziness option:
{
"query": {
"match": {
"Content.ContentItem.FullText": {
"query": "{{ term }}",
"fuzziness": "AUTO",
"analyzer": "whitespace"
}
}
}
}