Skip to content

Commit

Permalink
Release 1.8.1 (#15019)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek committed Jan 9, 2024
1 parent b8d6d96 commit ddb53d7
Show file tree
Hide file tree
Showing 23 changed files with 84 additions and 45 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Orchard Core consists of two distinct projects:

## Build Status

Stable (release/1.8.0):
Stable (release/1.8.1):

[![Build status](https://github.com/OrchardCMS/OrchardCore/actions/workflows/release_ci.yml/badge.svg)](https://github.com/OrchardCMS/OrchardCore/actions?query=workflow%3A%22Release+-+CI%22)
[![NuGet](https://img.shields.io/nuget/v/OrchardCore.Application.Cms.Targets.svg)](https://www.nuget.org/packages/OrchardCore.Application.Cms.Targets)
Expand All @@ -30,7 +30,7 @@ Nightly (main):

## Status

### 1.8.0
### 1.8.1

The software is finished -- and by finished, we mean there are no show-stopping, little-children-killing bugs in it. That we know of. There are probably numerous lower-priority bugs triaged into the next point release or service pack, as well.

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ nav:
- Owners: docs/resources/owners/README.md
- Workshops: docs/resources/workshops/README.md
- Releases:
- 1.8.1: docs/releases/1.8.1.md
- 1.8.0: docs/releases/1.8.0.md
- 1.7.2: docs/releases/1.7.2.md
- 1.7.1: docs/releases/1.7.1.md
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Build/OrchardCore.Commons.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<LangVersion>12.0</LangVersion>
<VersionPrefix>1.8.0</VersionPrefix>
<VersionPrefix>1.8.1</VersionPrefix>
<VersionSuffix></VersionSuffix>
<VersionSuffix Condition="'$(VersionSuffix)'!='' AND '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
<script asp-name="media" at="Foot"></script>
<style asp-name="media" at="Head"></style>

<script at="Foot">
<script at="Foot" asp-name="MediaFieldAppInitializer" depends-on="media">
initializeMediaApplication(false, '@Url.Action("MediaApplication", "Admin", new { area = "OrchardCore.Media" })', '@Context.Request.PathBase.ToString()');
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
<script asp-name="media" at="Foot"></script>
<style asp-name="media" at="Head"></style>

<script at="Foot">
<script at="Foot" asp-name="MediaFieldAppInitializer" depends-on="media">
initializeMediaApplication(false, '@Url.Action("MediaApplication", "Admin", new { area = "OrchardCore.Media" })', '@Context.Request.PathBase.ToString()');
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
<script asp-name="media" at="Foot"></script>
<style asp-name="media" at="Head"></style>

<script at="Foot">
<script at="Foot" asp-name="MediaFieldAppInitializer" depends-on="media">
initializeMediaApplication(false, '@Url.Action("MediaApplication", "Admin", new { area = "OrchardCore.Media" })', '@Context.Request.PathBase.ToString()');
</script>
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<script asp-name="media" at="Foot"></script>
<style asp-name="media" at="Head"></style>

<script at="Foot">
<script at="Foot" asp-name="MediaFieldAppInitializer" depends-on="media">
initializeMediaApplication(true, '@Url.Action("MediaApplication", "Admin", new { area = "OrchardCore.Media" })', '@Context.Request.PathBase.ToString()');
</script>

<script at="Foot">
@* mediaApp is absolutely positioned. When a warning is shown we need to move it down to avoid overlapping. *@
$(function () {
if (!$('.message').length) { return; };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
var mediaFieldId = Html.IdFor(m => m);
}

<script asp-name="media" at="Foot"></script>
<style asp-name="media" at="Head"></style>

<div class="@Orchard.GetFieldWrapperClasses(Model.PartFieldDefinition)" id="@Html.IdFor(x => x.Paths)_FieldWrapper">
Expand Down Expand Up @@ -65,6 +64,7 @@
<partial name="Shared/MediaFieldEditLocalization.cshtml" />
</div>

<script asp-name="media" at="Foot"></script>
<script at="Foot">
initializeAttachedMediaField(
document.getElementById('@mediaFieldId'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
var settings = Model.PartFieldDefinition.GetSettings<MediaFieldSettings>();
var modalMediaId = "Modal" + Html.IdFor(m => m);
}
<script asp-name="media" at="Foot"></script>
<style asp-name="media" at="Head"></style>

<div class="@Orchard.GetFieldWrapperClasses(Model.PartFieldDefinition)" id="@Html.IdFor(x => x.Paths)_FieldWrapper">
Expand Down Expand Up @@ -62,9 +61,12 @@
<partial name="Shared/MediaFieldEditLocalization.cshtml" />
</div>

<script at="Foot">
<script asp-name="media" at="Foot"></script>
<script at="Foot" asp-name="MediaFieldAppInitializer" depends-on="media">
initializeMediaApplication(false, '@Url.Action("MediaApplication", "Admin", new { area = "OrchardCore.Media", extensions = string.Join(',', Model.AllowedExtensions) })', '@Context.Request.PathBase.ToString()');
</script>

<script at="Foot">
initializeMediaField(
document.getElementById('@Html.IdFor(m => m)'),
document.getElementById('@Html.IdFor(m => m)-ModalBody'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace OrchardCore.Search.Elasticsearch.GraphQL
/// <summary>
/// These services are registered on the tenant service collection
/// </summary>
[RequireFeatures("OrchardCore.Apis.GraphQL")]
[RequireFeatures("OrchardCore.Apis.GraphQL", "OrchardCore.Queries")]
public class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace OrchardCore.Search.Lucene.GraphQL
/// <summary>
/// These services are registered on the tenant service collection
/// </summary>
[RequireFeatures("OrchardCore.Apis.GraphQL")]
[RequireFeatures("OrchardCore.Apis.GraphQL", "OrchardCore.Queries")]
public class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public static class ManifestConstants
{
public const string OrchardCoreTeam = "The Orchard Core Team";

public const string OrchardCoreVersion = "1.8.0";
public const string OrchardCoreVersion = "1.8.1";

public const string OrchardCoreWebsite = "https://orchardcore.net";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
using System;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Environment.Shell.Builders;

namespace OrchardCore.Environment.Shell.Scope
namespace OrchardCore.Environment.Shell.Scope;

/// <summary>
/// Makes an 'IServiceProvider' aware of the current 'ShellScope'.
/// </summary>
public class ShellScopeServices(IServiceProvider services) : IKeyedServiceProvider
{
public class ShellScopeServices : IServiceProvider
{
private readonly IServiceProvider _services;
private readonly IServiceProvider _services = services;

private IServiceProvider Services
=> ShellScope.Services ?? _services;

/// <summary>
/// Makes an 'IServiceProvider' aware of the current 'ShellScope'.
/// </summary>
public ShellScopeServices(IServiceProvider services) => _services = services;
public object GetKeyedService(Type serviceType, object serviceKey)
=> Services.GetKeyedService(serviceType, serviceKey);

private IServiceProvider Services => ShellScope.Services ?? _services;
public object GetRequiredKeyedService(Type serviceType, object serviceKey)
=> Services.GetRequiredKeyedService(serviceType, serviceKey);

public object GetService(Type serviceType) => Services?.GetService(serviceType);
}
public object GetService(Type serviceType)
=> Services?.GetService(serviceType);
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public ContentPartDefinition Build()
public ContentPartDefinitionBuilder Named(string name)
{
Name = name;

return this;
}

Expand All @@ -72,19 +73,22 @@ public ContentPartDefinitionBuilder RemoveField(string fieldName)
{
_fields.Remove(existingField);
}

return this;
}

[Obsolete("Use WithSettings<T>. This will be removed in a future version.")]
public ContentPartDefinitionBuilder WithSetting(string name, string value)
{
_settings[name] = value;

return this;
}

public ContentPartDefinitionBuilder MergeSettings(JObject settings)
{
_settings.Merge(settings, ContentBuilderSettings.JsonMergeSettings);

return this;
}

Expand All @@ -101,6 +105,7 @@ public ContentPartDefinitionBuilder MergeSettings<T>(Action<T> setting) where T
var settingsToMerge = existingJObject.ToObject<T>();
setting(settingsToMerge);
_settings[typeof(T).Name] = JObject.FromObject(settingsToMerge, ContentBuilderSettings.IgnoreDefaultValuesSerializer);

return this;
}

Expand Down Expand Up @@ -134,12 +139,19 @@ public ContentPartDefinitionBuilder WithField(string fieldName, Action<ContentPa
{
existingField = new ContentPartFieldDefinition(null, fieldName, new JObject());
}

var configurer = new FieldConfigurerImpl(existingField, _part);
// Assume that the display name is the same as the field name.
// Set the display name before invoking the given action, to allow the action to set the display-name explicitly.
configurer.WithDisplayName(fieldName);

configuration(configurer);

if (string.IsNullOrEmpty(existingField.DisplayName()))
{
// If there is no display name, let's use the field name by default.
configurer.WithDisplayName(fieldName);
}

_fields.Add(configurer.Build());

return this;
}

Expand Down Expand Up @@ -182,11 +194,14 @@ public async Task<ContentPartDefinitionBuilder> WithFieldAsync(string fieldName,
}

var configurer = new FieldConfigurerImpl(existingField, _part);
// Assume that the display name is the same as the field name.
// Set the display name before invoking the given action, to allow the action to set the display-name explicitly.
configurer.WithDisplayName(fieldName);

await configurationAsync(configurer);

if (string.IsNullOrEmpty(existingField.DisplayName()))
{
// If there is no display name, let's use the field name by default.
configurer.WithDisplayName(fieldName);
}

_fields.Add(configurer.Build());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static string DisplayName(this ContentPartFieldDefinition partField)

if (string.IsNullOrEmpty(displayName))
{
displayName = partField.FieldDefinition.Name;
displayName = partField.FieldDefinition?.Name;
}

return displayName;
Expand Down
4 changes: 2 additions & 2 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Orchard Core CMS supports all major site building strategies:

## Status

The latest released version of Orchard Core is `1.8.0`.
The release notes can be found on <https://github.com/OrchardCMS/OrchardCore/releases/tag/v1.8.0>
The latest released version of Orchard Core is `1.8.1`.
The release notes can be found on <https://github.com/OrchardCMS/OrchardCore/releases/tag/v1.8.1>

Here is a more detailed [roadmap](https://github.com/OrchardCMS/OrchardCore/wiki/Roadmap).

Expand Down
10 changes: 5 additions & 5 deletions src/docs/getting-started/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ More information about `dotnet new` can be found at <https://docs.microsoft.com/
Once the .NET Core SDK has been installed, type the following command to install the templates for creating Orchard Core web applications:

```CMD
dotnet new install OrchardCore.ProjectTemplates::1.8.0
dotnet new install OrchardCore.ProjectTemplates::1.8.1
```

This will use the most stable release of Orchard Core. In order to use the latest `main` branch of Orchard Core, the following command can be used:

```CMD
dotnet new install OrchardCore.ProjectTemplates::1.8.0-* --nuget-source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json
dotnet new install OrchardCore.ProjectTemplates::1.8.1-* --nuget-source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json
```

## Create a new website
Expand All @@ -25,7 +25,7 @@ dotnet new install OrchardCore.ProjectTemplates::1.8.0-* --nuget-source https://
#### Generate an Orchard Cms Web Application

!!! warning
Due to a bug in the current published version, the following `dotnet new` commands will require the extra argument `--orchard-version 1.8.0`. For instance, instead of typing `dotnet new occms` use `dotnet new occms --orchard-version 1.8.0`
Due to a bug in the current published version, the following `dotnet new` commands will require the extra argument `--orchard-version 1.8.1`. For instance, instead of typing `dotnet new occms` use `dotnet new occms --orchard-version 1.8.1`

```CMD
dotnet new occms
Expand All @@ -47,7 +47,7 @@ Options:
-ov|--orchard-version Specifies which version of Orchard Core packages to use.
string - Optional
Default: 1.8.0
Default: 1.8.1
```

Logging can be ignored with this command:
Expand Down Expand Up @@ -134,7 +134,7 @@ Options:
-ov|--orchard-version Specifies which version of Orchard Core packages to use.
string - Optional
Default: 1.8.0
Default: 1.8.1
```

```CMD
Expand Down
6 changes: 3 additions & 3 deletions src/docs/guides/add-admin-menu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ There are different ways to create sites and modules for Orchard Core. You can l

You can install the latest released templates using this command:

```dotnet new install OrchardCore.ProjectTemplates::1.8.0-*```
```dotnet new install OrchardCore.ProjectTemplates::1.8.1-*```

!!! note
To use the development branch of the template add `--nuget-source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json`
Expand All @@ -40,10 +40,10 @@ The next step is to reference the module from the application, by adding a proje

We also need a reference to the `OrchardCore.Admin` package in order to be able to implement the required interfaces:

```dotnet add .\MyModule\MyModule.csproj package OrchardCore.Admin --version 1.8.0-*```
```dotnet add .\MyModule\MyModule.csproj package OrchardCore.Admin --version 1.8.1-*```

!!! note
To use the development branch of the template add ` --source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json --version 1.8.0-*`
To use the development branch of the template add ` --source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json --version 1.8.1-*`

## Adding our controller and views

Expand Down
2 changes: 1 addition & 1 deletion src/docs/guides/create-cms-application/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ There are different ways to create sites and modules for Orchard Core. You can l

In this guide we will use our "Code Generation Templates". You can install the latest stable release of the templates using this command:

```dotnet new install OrchardCore.ProjectTemplates::1.8.0-*```
```dotnet new install OrchardCore.ProjectTemplates::1.8.1-*```

!!! note
To use the development branch of the template add `--nuget-source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json`
Expand Down
2 changes: 1 addition & 1 deletion src/docs/guides/create-modular-application-mvc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ There are different ways to create sites and modules for Orchard Core. You can l

In this guide we will use our [Code Generation Templates](../../getting-started/templates/). You can install the latest stable release of the templates using this command:

```dotnet new install OrchardCore.ProjectTemplates::1.8.0-*```
```dotnet new install OrchardCore.ProjectTemplates::1.8.1-*```

!!! note
To use the development branch of the template add `--nuget-source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json`
Expand Down
2 changes: 1 addition & 1 deletion src/docs/guides/decoupled-cms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This will allow for the Razor Pages to be reloaded without the need to recompile

```xml
<ItemGroup>
<PackageReference Include="OrchardCore.Application.Cms.Core.Targets" Version="1.8.0" />
<PackageReference Include="OrchardCore.Application.Cms.Core.Targets" Version="1.8.1" />
</ItemGroup>
```

Expand Down
2 changes: 1 addition & 1 deletion src/docs/releases/1.8.0.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Orchard Core 1.8.0

Release date: January 2024
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.

Expand Down
12 changes: 12 additions & 0 deletions src/docs/releases/1.8.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Orchard Core 1.8.1

Release date: January 9, 2024

## What's Changed

* Fix dependencies for GraphQL by @MikeAlhayek in <https://github.com/OrchardCMS/OrchardCore/pull/15015>
* Set a default display name only when none is specified by @giannik and @MikeAlhayek in <https://github.com/OrchardCMS/OrchardCore/pull/15013>
* Add Keyed services support in ShellScopeServices by @MikeAlhayek in <https://github.com/OrchardCMS/OrchardCore/pull/14998>
* Fix Media Field dependency by @MikeAlhayek in <https://github.com/OrchardCMS/OrchardCore/pull/15017>

**Full Changelog**: <https://github.com/OrchardCMS/OrchardCore/compare/v1.8.0...v1.8.1>

0 comments on commit ddb53d7

Please sign in to comment.