Fix content types fields dependency, Orchard Core in MS Tech Summit - This week in Orchard (25/11/2022)

Gábor Domonkos's avatar
Admin UI, Announcement, This week in Orchard, Publishing, MSBuild

Fix content types fields dependency, implement ITicketStore for large cookies, fix OC version used in templates, and an upcoming talk from Lombiq about Orchard Core at the MS Tech Summit conference next week! Check out our post for the details!

Orchard Core updates

Fix content types fields dependency

When we enable the OrchardCore.ContentTypes feature but not enable any feature that composes fields like OrchardCore.ContentFields, the Fields section shows up.

Displaying Fields section

Here we should remove the Add Field button when there are no field definitions. Also, if a currently attached field has no definition, we should not be able to edit it, but we should be able to remove it. This can happen if a field was attached to a content type/part while the field definition is available, but then the feature that provides the definition was disabled.

Moreover, we should remove the Fields section from the UI if the current content type has no fields and also there are no field definitions.

Let's say that we have a site installed with the Blog recipe. This recipe defines a content type called Blog Post which has several content fields attached. These fields are defined by the following modules: Content Fields, Markdown, Media, Taxonomies, etc. So, if we disable all of these features and navigate to Content -> Content Definition -> Content Types -> Blog Post and check out the Fields section, you will see that you can only remove the attached fields and not edit them, furthermore the Add Field button is missing because we have no content field definitions in our site, so, there is no need to display this button because it would only show you an empty list.

The content definition of the Blog Post without field definitions

Implement ITicketStore for large cookies

You have the option as an admin user to create a custom role with lots of content types and provide custom permissions to the user. But it could mean that the logged-in user having custom permissions cannot access the admin section as authentication cookie size increases and some web servers have a limit on header sizes (e.g., IIS 16kb, Kestrel 32kb).

This introduces the implementation of ITicketStore as an optional feature, when enabled, it will store all claims for the logged-in user on the server's in-memory cache or distributed cache instead of a cookie.

Implement ITicketStore for large cookies

Fix OC version used in templates

The template default settings are generated on the build. These templates have an OrchardVersion argument that has a default value defined in an MSBuild script to be replaced with the Version property. In the release pipeline, this value will have the VersionSuffix applied to it, like the preview.

This fix forces the value of the Version property to be the one in the tag which will prevent preview from being added. This will also fix the templates' default value for OrchardVersion.

The pack command uses the Version property only for the packages, and at that point, the template JSON files are already built with the wrong version.

Fix OC version used in templates

News from the community

Orchard Core at MS Tech Summit

Are you involved in any area (from development to DevOps and cloud to architecture) related to Microsoft technologies? If so, the MS Tech Summit is the event created for you. Close to 50 keynotes, 25 Microsoft MVP award-winning speakers, expo, live streaming, and VoD, all free of charge.

Zoltán Lehóczky from Lombiq will give a talk too, about building websites with Orchard Core. Check out the free online conference coming on 2 December to see his talk too!

Orchard Core in MS Tech Summit

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 379 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