Orchard Core 1.7.1 and Orchard Core 1.7.2 - This week in Orchard (20/10/2023)

Gábor Domonkos's avatar
Announcement, Query, This week in Orchard, Workflows

Orchard Core 1.7.1 and Orchard Core 1.7.2 have been released to address some issues of the 1.7.0 release. In our current post, we will check out everything that you should know about the latest release of Orchard Core! Check out our post for the details!

Orchard Core updates

Fix workflow page list issue when using PostgreSQL

When a new Orchard Core 1.7 application using PostgreSQL is started, the Workflow page (/Admin/Workflows/Types) gives an error when opening. This error happened after upgrading a 1.6 project using PostgreSQL to 1.7. If you did a clean installation via the Orchard Core repo, you encountered this error again when using PostgreSQL. If you are using SQLite, this problem does not occur.

The issue was in the following query that caused problems with PostgreSQL: "SELECT DISTINCT WorkflowTypeId FROM \"WorkflowIndex\""

Fix workflows page list issue when using PostgreSQL

After the fix, the query looks like the following: "SELECT DISTINCT \"WorkflowIndex\".\"WorkflowTypeId\" FROM \"WorkflowIndex\""

Set index length limit for MySQL

Multiple exceptions were thrown when you started a new MySQL-based instance of Orchard Core 1.7, and of course, the expected behavior is to start the application successfully without any exception.

The issue was the following. An index entry in MySQL can't contain more than 3072 bytes. With the current default utf8nb4 collation, this accounts for 768 chars. This means that all the fields that make up an index entry can't go over that, but only in MySQL.

MySQL has a custom syntax to define the prefix size of an index, meaning the amount of data to use for each field. For instance, we can limit the Alias field size in the index with CREATE INDEX ... (DocumentId, Alias(50), ...), and then it would only take the first 50 chars even if the content is bigger. This way, we can have limits on the content itself, MaxAliasSize, but a distinct max size for the index. And we wouldn't need to constrain the field size to the index size for MySQL.

In YesSql the columns names are injected as-is in the SQL Query:

So, if we change the current migration to something like this, this would work as long as the sum of these constraints is less than 767 chars.

SchemaBuilder.AlterIndexTable<AliasPartIndex>(table => table

Set index length limit for MySQL

News from the community

Orchard Core 1.7.1 and Orchard Core 1.7.2

Orchard Core 1.7.2 was released a few days after the 1.7.1 one to address some issues of the 1.7.0 release. If you open up nuget.org and search for the OrchardCore.Application.Cms.Targets package, you will find the newest released version of Orchard Core! Upgrade your solution to 1.7.2 now! Feel free to drop on the dedicated Gitter chat or use the Discussions on GitHub and ask questions!

Orchard Core 1.7.1 and Orchard Core 1.7.2

Let's just quickly list the fixes that have been addressed in the latest release. If you click on each, you will be redirected to the related This week in Orchard post, where you can find more details about them.

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 491 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 would like to read our weekly articles? Tell them to subscribe here!

If you are interested in more news about 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