src/docs/releases/1.8.0.md
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.
The interface OrchardCore.Documents.IDocumentSerialiser has been renamed to OrchardCore.Documents.IDocumentSerializer.
This release removes support for net6.0 and net7.0. Only net8.0 is supported.
The TheAdmin theme was upgraded to Bootstrap 5.3.2. Here is a list of the breaking changes
bg-primary class was changed to text-bg-theme.darkmode theme is now called dark.default theme is now called light.auto which allows us to use the default device color preference.DarkModeService.cs was replaced with ThemeTogglerService.DisplayDarkMode in AdminSettings was replaced with DisplayThemeToggler.TheAdmin.css. Bootstrap are loaded independently for performance and maintainability reasons.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)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.
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.
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.
IStereotypeServiceIStereotypesProviderIRouteableContentTypeProviderIRouteableContentTypeCoordinatorIContentDefinitionServiceIContentDefinitionManagerIContentDefinitionServiceThe TheTheme theme was upgraded to Bootstrap 5.3.2. New light and dark modes were added.
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
ContentCulturePickerContainerAdminCulturePickerContainerNavbar Shape for Custom ThemeTo 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"))
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"
}
}
}
}