Our blog contains the activity stream of Orchard Dojo: general news, new resources or tutorials are announced here.

Featured tags

IIS
API
SMS
SEO
All tags >

Prevent Trumbowyg from converting <div> to <p> element, Elasticsearch feature - This week in Orchard (26/08/2022)

Prevent Trumbowyg from converting <div> to <p> element, reduce memory when reloading settings of a given tenant from the database, and a demo about the upcoming Elasticsearch feature! Let's get started! Orchard Core updates Prevent Trumbowyg from converting <div> to <p> element When using HtmlBodyPart or HTMLField with either WYSIWYG or Trumbowyg, the editor converts <div> elements to <p>. Also, when the user switches into code insert mode, the text area does not take up the full size of the editor. Steps to reproduce the behavior: Add HtmlBodyPart or HtmlField to a content type, and use either WYSIWYG or Trumbowyg editors. Create new or edit an existing content item. Click on <> of the editor to switch into code insert mode and insert the following. The issue is that the Semantic option is enabled by default. By enabling Semantic, it generates a better, more semantic-oriented HTML (i.e. <em> instead of <i>, <strong> instead of <b>, etc.), meaning: $('.trumbowyg').trumbowyg({ semantic: { 'b': 'strong', 'i': 'em', 's': 'del', 'strike': 'del', 'div': 'p' }}); The idea is that the "Wysiwyg" editor option should not alter the "Tryumbowyg" editor default behavior. This is why we have the "Trumbowyg" editor option that allows changing its behavior for your own needs. So, the fix was to set the semantic: false on the Wysiwyg templates and don't change anything on the Trumbowyg templates. Reduce memory when reloading settings of a given tenant from the database There appears to be a memory leak caused by the usage of IConfiguration as the backing for ShellSettings. Memory used by each ShellSettings instance is not being freed for garbage collection due to some fairly crazy gcroots even if you intentionally release the ShellSetting. Most of the memory is being used by Strings related to the DatabaseShellsSettingsSources with the VersionId field being the largest consumer of memory. The problem is that the DatabaseShellsSettingSources contains data for ALL tenants (which can be 2000+ in some cases) even if you're only loading/reloading a single tenant. So, among our tenant config/settings sources, one of them is by default the tenants.json file. In fact, when we reload a given tenant, we don't need all data from this source but only those related to this tenant. When we add this source to the config stack of a given tenant, if we still use builder.AddJsonFile() we have no choice, we can't split this file into smaller parts per tenant. But when this source comes from the database, we do a builder.AddJsonStream() on a MemoryStream that holds all data of this source, so here the idea is to only hold in memory the data related to this tenant. To do so Jean-Thierry Kéchichian added a method to the interface of this source allowing to pass a tenant name. So that when the source comes from the database, each time we reload a specified tenant we still create a MemoryStream but that only holds the data related to this tenant (not all tenants). When calling this new method on the other implementations of this source, they just ignore the provided tenant name by calling the existing method without this parameter. Demos Elasticsearch feature Elasticsearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents. This time we will see how you can use Elasticsearch in Orchard Core using the Elasticsearch feature, which can be found in this pull request and will be released soon. The Readme.md file of the module describes how you can use this feature for development and testing purposes by using Docker. We won't go into the details of how to install Docker and use the Docker Compose file, the Readme.md file mentioned has a nice step-by-step tutorial about that part. So, let's say we have a Docker container running the Elasticsearch image on port 9200 (the default one). The Elasticsearch module connection configuration can be set globally in the appsettings.json file or per tenant. The connection types documentation and examples can be found at this URL. To try out this feature, you need to enable the Elasticsearch feature under Configuration -> Features. You can also see a Content Picker for Elasticsearch, just like we have for Lucene, and a Worker. And of course, don't forget to enable the Search module as well, which adds front-end search capabilities. We will use this feature to try out the new Elasticsearch feature. The Elasticsearch module has some settings in the admin, where you can configure the search settings for the module (Search -> Settings -> Elasticsearch), and you can decide which fields you want to use for the search pages. It's quite the same as Lucene's settings, but it's a separate page because you can index different fields for Elasticsearch and Lucene. And for the search form, we can decide which provider we want and it will work at runtime. This means you can seamlessly switch from one indexing provider to another one. You can set this up under Search -> Settings -> Search. If you navigate to the default URL of the search form (/search) you can use this form as you would use it in the case of Lucene. But of course, you need to have an Elasticsearch index that you can use while doing a search and the indices can be set up under Search -> Indexing -> Elasticsearch Indices. As you can see, here we created a new index called default_search and indexed some content types. And now, you can use the search form to return results based on your query. The default_search index contains the Article and the Blog Post content types, so if we use the "man OR about" query, the site will return us two results, the default blog post, and the default article content items. And we are just scratching the surface here. The Readme.md file contains a lot more: how to create an Elasticsearch index during recipe execution, how to create an Elasticsearch query from a Queries recipe step, how to use Web APIs to execute a query, and a lot more! Check out this recording on YouTube if you would like to know more about this upcoming feature! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 341 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!

Admin Culture Picker, Enhance BagPart to honor permissions - This week in Orchard (12/08/2022)

Enhance BagPart to honor permissions, add permissions for the Amazon S3 module, improve the workflow function description in the document, and a demo about the Admin Culture Picker! Let's get started! Orchard Core updates Enhance BagPart to honor permissions Let's say you want some users to be able to add content items to a specific bag while others to only be able to view only existing items. Currently, any content item contained in a BagPart is always editable regardless if the contained item is securable or not. In most cases, this is fine. However, this function should also be extended to honor the security rules when the contained item is securable. This means a user with EditContent permission can add/edit items to the BagPart whereas a user with ViewContent permission only should see the content item as a read-only version "like preview" but should not be able to make any change to it. So, this addition is about enhancing the BagPart to honor permissions for the contained content types. To try this one out, set up a site using the Agency recipe which contains the Landing Page content type which has several BagParts attached. Now, let's say that users with the Editor role will not be able to edit the services section of the Landing Page. Meaning the Editor role will not have Edit permission for the Service content items. We have to do things to achieve this: Edit the Service Content Type and put a tick to the Securable check box. This means this content type can have custom permissions. Edit the permissions of the Editor role. First, revoke the Edit content for others permission. Now, make sure that the Editor has no Edit Service for others permission regarding the Service Content Type. Now we set up that users with the Editor role will not be able to edit securable content types. Let's create a user with this role and log in as this new user. Now, we need to find the predefined Landing Page content item and edit it. As you can see, this user cannot add or edit an existing Service content item by using the editor of the BagPart. They can view the content of these items, but that's all. Notice that they can edit the Portfolio content items under the Services one. Add permissions for the Amazon S3 module A few weeks ago, we mentioned the new Amazon S3 module. The Amazon Media Storage feature enables support for storing assets in Amazon S3 Bucket. The feature replaces the default App_Data file-based media store with an Amazon Media Storage Provider. And now, you will see new permissions for that module called View Amazon S3 Media Options. If you have this permission, you can access the page under Configuration -> Media -> Amazon S3 Options which lists the Amazon S3 storage options. Improve the workflow function description in the document The Workflows module provides a way for users to visually implement business rules using flowchart diagrams. Many activities have settings that can contain either JavaScript or Liquid syntax. The fields of these activities allow you to enter Liquid markup, enabling access to system-wide variables and filters, as well as variables from the workflow execution context. And several JavaScript functions are available by default to any activity that supports script expressions. This page of the documentation lists these functions. And now, this table has been updated with some lines about the setProperty, executeQuery, and log functions. Demos Admin Culture Picker Unless you have a language switcher on website pages, you could not switch a language in the admin panel. This demo is about showing you a dropdown button in the admin panel header to switch languages. First of all, open up the admin UI of Orchard and head to Configuration -> Features, and enable the Admin Culture Picker one, which provides a culture picker shape for the admin. Don't forget to enable the Localization feature too, to be able to try out this culture picker. Now you can say that your site supports multiple cultures. Head to Configuration -> Settings -> Localization -> Cultures and have at least two supported cultures. And as you can see, the dropdown now contains all the cultures that the site supports. You can switch between them, and if you choose a given language, the UI of the admin will be shown by using the words of the given language. If you would like to see this picker in action, head to YouTube for a short demo! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 315 subscribers! We have started this newsletter to inform the community around Orchard with 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!

Change how the permissions are grouped and sorted, provide a way to override YesSql configuration - This week in Orchard (29/07/2022)

Change how the permissions are grouped and sorted, provide a way to override YesSql configuration and additional OpenId Introspection/Revocation endpoints and PKCE to the OpenID Settings and Application UI pages! Check out our current post to read about the details! Orchard Core updates Change how the permissions are grouped and sorted When the permissions are listed during role edit/create, currently we show the feature ID instead of a name. Displaying just the feature ID is not user-friendly. Here the goal is to create a new UI for this and also to order the permissions by Feature Names. Also, for content types, then it would display the content type name instead of its technical value/ID. So, we could display:{ Content Type Display Name } Content Type - { Content Type Technical Name }. In the case of the Blog content type could be My Blog Content Type - Blog. In order to show dynamic permissions as { Content Type Display Name } Content Type - { Content Type Technical Name } we would have to change how the category is set here otherwise we don't have the content type technical name here. But how the new UI looks like now? If you head to the admin UI of Orchard Core and navigate to Security -> Roles and Edit a given role, you will see the new UI. Here you can see we have a feature with the name Media and you can find the feature ID in brackets (they can be defined in the Manifest.cs file of the module). And under the Media (OrchardCore.Media), you can find all of the permissions which were defined in this module. You will find the Page Content Type - Page header at the bottom of this screen. This means the first word here is the Display Name of the Page content type (which is Page) and the last word here is the Technical Name of the Page content type, which is Page. Provide a way to override YesSql configuration Currently, there is no way to change the configuration of YesSql in Orchard Core. From now on you will find a new YesSqlOptions class that provides options to allow one to override the defaults. Added additional OpenId Introspection/Revocation endpoints and PKCE to the OpenID Settings and Application UI pages As a basic authorization server, the OpenID module doesn't use all the features/endpoints offered by OpenIddict, like introspection and revocation. As mentioned in openiddict/openiddict-core#1359 (comment), these features can be configured by amending the OpenIddict settings via a custom plugin, but a simpler story - GUI or recipes-based - may be preferable. To see the new changes, enable the OpenID Authorization Server and the OpenID Client features and after navigate to Security -> OpenID Connect -> Settings -> Authorization server. You will find a new Require Proof Key for Code Exchange checkbox on this page, which is a global setting that applies PKCE to all registered clients whether or not the 'Require PKCE' flag was set in the Application settings page. And you can do the same when adding an OpenID Connect Application. You can add a new application under Security -> OpenID Connect -> Management -> Applications. If you click on the Add an application button and put a tick to the Allow Authorization Code Flow checkbox, you will find the Require Proof Key for Code Exchange checkbox here as well. Note: ensure that the client application and OAuth or OIDC library being used supports PKCE before enabling this option. The documentation has also been updated to show you a sample of the OpenID Connect Settings recipe step and a sample of the OpenID Connect App recipe step. News from the community Lombiq Offline event Sometimes it's not just about work but doing something just for fun. These events are specifically for this: we get together and do something cool like breaking out of an escape room, going for a go-kart ride, or playing paintball. Our latest event took place at Lake Velence. We had a nice cycling tour around Lake Velence, had lunch in a nice restaurant, and had a barbecue together at the accommodation. The next day we went on a kayak trip and did a nice trip together to the nearby hills of the lake. This was a great opportunity to update our group photo on our official website, so head to the About us page where you can see most, but not all of our team as of the summer of 2022. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 313 subscribers! We have started this newsletter to inform the community around Orchard with 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!

Deployment UI improvements, display all users in the User Picker Field by default - This week in Orchard (15/07/2022)

Updating the Getting Started page, Deployment UI improvements, using proper Canonical URL in SEO Tags, displaying all users in the User Picker Field by default. Check out our current post to read about the details! Orchard Core updates Updating the "Getting Started" page of the documentation The Getting Started page of the documentation is outdated, so much so that it is not possible to get the results described. As an example, the latest version of Orchard Core 1.4.0 uses .Net 6.0, and accordingly, if you create a new empty project '.NET Core web application' with .Net 6.0, you will not have a Startup.cs file in which all the basic manipulations should take place. For new developers, this section is an important element of getting started with Orchard. And such difficulties in the guide can have a negative impact on entering a new environment. The goal here was to update this section for use on the latest stable version of Orchard Core and be sure to specify the platform versions on which it should work in case of obsolescence to be clear for which version this instruction is valid. Now, if you open up the Getting Started page of the documentation, you will see a section that helps you get started with Program.cs only using .NET 6 Framework. Add Manage Steps to the button to the deployment and add a description to the feature When viewing deployment plans on the UI, clicking the title directs the user to the manage steps page, which is great. However, there is no other indication about managing steps. In other words, the user does not know the difference between editing or managing steps. Now, there is a new button called Manage Steps that directs the user to the manage deployment steps page. This way the user can easily understand that there are 2 edit functions here (i.e., one for editing the steps and the other one for editing the deployment plan itself.) Also, the Deployment feature now has some sort of description like: Provides a way to import and export recipes. You can see both improvements on this screen. Display all users in the User Picker Field by default unless the user selects a specific role When a user attaches a User Picker Field to a content type, the field settings do not have default roles selected or have the DisplayAllUsers set to true, so in this case, the search for a user returns no records. The fix is to display all users in the User Picker Field by default to allow all users to show up. If the user wants to override that behavior, then they can specific roles to select from. Without this, no users will show up in User Picker Field unless the user edits the field and set the settings. Here we played with our favorite content type, the BlogPost, where we added a User Picker Field to it (Content -> Content Definition -> Content Types -> Blog Post -> Add Field). And that's all we haven't done any other modifications regarding the settings of the User Picker Field. Now, if you create a new blog post, you will see that the User Picker Field will list every user from the site instead of listing nobody by default. Use proper Canonical URL in SEO Tags Piers Lawson noticed that when he generates the URL of a Content Item that happens to be the Home Page, then the URL generated includes the permalink for the page. This then flows into other uses of the URL such as when the SEO module creates the og:url property or the Twitter:url. <meta content="https://localhost:44300/home-page" property="og:url" /><meta content="https://localhost:44300/home-page" name="twitter:url" /> He thought he could override this behavior by turning on the SEOMeta Part for the Content-Type used for the home page and providing a Canonical URL for the Content Item that is being used for the home page. That causes the link rel canonical to be added and set correctly but not the other tags: <meta content="https://localhost:44300/home-page" property="og:url" /><meta content="https://localhost:44300/home-page" name="twitter:url" /><link href="https://localhost:44300/" rel="canonical" /> The issue was it doesn't appear possible to set up a page to be the home page without Autoroute nor with Autoroute and a blank permalink. Now, this has been fixed in the SeoMetaSettingsHandler.cs. News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 291 subscribers! We have started this newsletter to inform the community around Orchard with 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!

Add Description to Content Types, Amazon S3 media options update - This week in Orchard (06/07/2022)

Adding Description to Content Types, Amazon Media Storage feature updates, and making media library upload size limit error message more detailed. Check out our current post to read about the details! Orchard Core updates Add Description to Content Types If you navigate to the admin UI of Orchard Core and head to Content -> Content Definition -> Content Parts and create or edit a Content Part, you have the option to optionally provide a description for the part. And Orchard Core displays this description on the page that lists Content Parts. And from now you can add descriptions to Content Types too! Amazon S3 media options update Neglectedvalue changed the custom AwsStorageOptions to AWSOptions provided by the AWS team. AWSOptions are more flexible and provide more ways to interact with AWS infrastructure: A huge piece of code(registration of the IAmazonS3 client) was removed and changed to a single call services.AddAWSService<IAmazonS3>(options); ClientFactory now allows using the common AWS credentials mechanism. Documentation was also updated. This change will also introduce many breaking changes: the OrchardCore_Media_AmazonS3 config section was changed: RegionEndpoint was renamed to Region and extracted from the Credentials section to the root section of OrchardCore_Media_AmazonS3, AccessKeyId was renamed to AccessKey, ProfileName was renamed to Profile. You will find these breaking changes in the documentation of the next Orchard Core release. Making media library upload size limit error messages more detailed It's not a bug, but rather an enhancement. When uploading to the media library a file larger than MaxFileSize, the error message isn't user-friendly, it just says 'Error: error'. You can quickly reproduce this by turning on the Media feature and uploading a file larger than MaxFileSize. From now on, the error message is more detailed, as you can see on the screen above. Thanks to Zoltán Máté from Lombiq for his first contribution! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 291 subscribers! We have started this newsletter to inform the community around Orchard with 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!

Add WebP to Media Profile options, Sitemap DateTime format should be ISO 8601 compliant - This week in Orchard (24/06/2022)

Adding WebP to Media Profile Options, fixing that Sitemap DateTime format should be ISO 8601 compliant, and updating the Scripting docs to reflect the correct way to use IScriptingManager and IScriptingEngine! Check out our current post to read about the details! Orchard Core updates Add WebP to Media Profile options WebP is an image file format developed by Google intended as a replacement for JPEG, PNG, and GIF file formats. It supports both lossy and lossless compression, as well as animation and alpha transparency. Google announced the WebP format in September 2010 and released the first version of its supporting library in April 2018. And from now you can select the WebP when adding a new Media Profile! To try that out, simply navigate to the admin UI of Orchard and find Configuration -> Media -> Media Profiles. Here you can add a new Media Profile or edit the existing ones. And the editor contains a dropdown where you can select the format for the processed image (a default value means a format command will not be applied). And from now, you can see that the list contains the WebP as well. Don't forget to check out the docs to know more about Media and Media Profiles! Sitemap DateTime format should be ISO 8601 compliant When formatting DateTime, sitemap source builders use the current culture instead of an invariant one. Here are the steps to reproduce the behavior: Change default culture to fi or fi-FI. Create a sitemap and add content to it. As a result, the formatted DateTime in the sitemap uses a period as a separator instead of a colon as you can see on the screen. Now, this has been fixed to use a colon as a separator instead of a period. Update the Scripting docs to reflect the correct way to use IScriptingManager and IScriptingEngine The scripting module provides an API allowing you to evaluate custom scripts in different languages. The example in the docs on how to evaluate code by executing some script using the IScriptingManager did not work. In the past, the example shows this way to get the current date using script. var scriptingManager = serviceProvider.GetService<IScriptingManager>();var date = scriptingManager.Evaluate("js: new Date().toISOString()"); However, the IScriptingManager does not expose a method that accepts string only. The goal here is to update the example to something like: var scriptingManager = serviceProvider.GetService<IScriptingManager>();var engine = scriptingManager.GetScriptingEngine("js");var scope = engine.CreateScope(_scriptingManager.GlobalMethodProviders.SelectMany(x => x.GetMethods()), serviceProvider, null, null);var date = engine.Evaluate("js: new Date().toISOString()"); If you open up the page from the docs about the Scripting module, you will find an updated example code that describes the correct way how to execute a script by using the IScriptingManager interface. News from the community Updated Lombiq's Open-Source Orchard Core Extensions Lombiq's Open-Source Orchard Core Extensions is an Orchard Core CMS Visual Studio solution. It contains most of Lombiq's open-source Orchard modules and themes, as well as related utilities and libraries, like the Lombiq UI Testing Toolbox or the Training Demo module that guides you to become an Orchard Core developer. And from now, this solution with all the extensions inside is updated for Orchard Core 1.4.! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 287 subscribers! We have started this newsletter to inform the community around Orchard with 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!

Amazon S3 Media Storage support, Content Localization module - This week in Orchard (17/06/2022)

New Amazon Media Storage feature that enables support for storing assets in Amazon S3 Bucket, a demo about the new Localization Matrix feature, and many more! Check out this post for the details! Orchard Core updates Amazon S3 Media Storage support The Amazon Media Storage feature enables support for storing assets in Amazon S3 Bucket. The feature replaces the default App_Data file-based media store with an Amazon Media Storage Provider. Media is still served by the Orchard Core website, and the Media Cache module takes responsibility for fetching media, on the fly, from the Amazon S3 Bucket. This allows the Amazon Media Storage feature to support image resizing on the fly through integration with ImageSharp.Web. The URL generated by the AssetUrl helpers points to the Orchard Core website. You can also find documentation about what configuration values are used by default and can be customized. In the docs, you can also read about the S3 Bucket policies, how to configure a bucket per tenant or how to configure a single bucket, with a base folder per tenant, and many more. Auto register IDisplayManager<T> for T on AddTheming In Orchard Core, to add a display manager, we configure services for each type as below eg, services.AddScoped<IDisplayManager<MenuItem>, DisplayManager<MenuItem>>();services.AddScoped<IDisplayManager<User>, DisplayManager<User>>(); It seems redundant code to resolve services for DisplayManager for a given type. Orchard builder should register generic display manager resolver as below, similar to what it's already done for Documents here. So, from now, instead of registering all the implementations of IDisplayManager<T>, there is a generic registration which is in the OrchardCoreBuilderExtensions.cs. So, anytime you resolve a generic IDisplayManager, you will get the DisplayManager of this time. Demos Content Localization module Hisham Bin Ateya has an organization on GitHub called OrchardCore Contrib with a couple of projects under it. The OrchardCoreContrib.Modules repository contains several modules. If you remember, you could also see a demo about the Swagger module made by Hisham, as well. This time we will check out how you can use the Content Localization Module. The point here is that this module provides easy integration. So, if you add the OrchardCoreContrib.ContentLocalization NuGet package to your Orchard Core host project, you are good to go. The module provides features for localizing content with one feature in it, called Localization Matrix, that shows a matrix for localized content per culture. Just head to the admin UI of Orchard Core and search for the matrix word in the Configuration -> Features screen. To be able to see the goal of this feature, we need to do some preparations first. That means, we need to have a content type with the Localization Part attached. We set up our site using the Blog recipe, so we just navigate to Content -> Content Definition -> Content Types and edit the Blog Post one. And under Parts, we add the Localization Part to it. And don't forget to have at least two cultures that are supported by the site (Configuration -> Settings -> Localization -> Cultures). Now, let's create another localized version for the built-in post, and let's create a new blog post as well with only one localization. Here come our blog post content items. Now let's see the new feature in action. If you navigate to Configuration -> Settings -> Localization -> Localization Matrix, you will see the new page added by this feature. This page shows you an overview of which content items are there in the system that is localizable (have Localization Part attached) and which versions they have. As you can see, we have the Hungarian and the US localization for the built-in blog post. But the blog post with the title Missing localization only has a US version but no Hungarian version. And as always, if you would like to know more about this feature, head to YouTube for a recording! News from the community Orchard Core Commerce MVP planning and survey A few weeks ago, you could see a nice demo about the Orchard Core Commerce module. And in that blog post, we also mentioned that Lombiq provides stewardship for this module. That actually means that we will do code reviews and work on features and fixes. To have that, Márk Bartha (who is the project leader from our side) started this thread and added this survey. This is about asking the community what the most important features for you would be in an Orchard Core-based e-commerce solution. If you do e-commerce or if you have an opinion about e-commerce, please share your opinion here. The point of this is to try to do not all the things but focus on what is really needed first. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 279 subscribers! We have started this newsletter to inform the community around Orchard with 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!

Gulp pipeline Guide, Security module - This week in Orchard (10/06/2022)

New Gulp pipeline Guide, fix content item display coordinator when a GroupId is provided, demo about the new Security module, and many more! Check out this post for the details! Orchard Core updates Gulp pipeline Guide There is a new Guide in the documentation that explains how the Gulp pipeline works and how to use it (what files to read, what files to output and bundle). If you would like to know more about the Gulp pipeline used in Orchard Core, check out this nicely-detailed page here! Use display names in registration settings If you enable the Users Registration module, you can have some registration-related settings under Security -> Settings -> User Registration. This page contains a Configure users registration drop-down where the values that the users can see was simply the names of enum that holds the user registration types. Now with this minor fix users can see nice-looking display names in this drop-down with spaces and everything. Fix content item display coordinator when a GroupId is provided When using the IContentItemDisplayManager build-editor for a specific GroupId, the drivers for each of the corresponding part never gets called. Steps to reproduce the behavior: Create a content part that generates special results when the content.GroupId is set to test. Create a content type and attach the content part you previously created. Now create a new controller to render the content items under a specific GroupId in the controller caller the driver like so _displayManager.BuildEditorAsync(contentItem, _accessor.Updater, true, "true", "some-prefix"). The expected behavior would be that the driver for each attached part would get called. It's then the driver's responsibility to return something, nothing, or something different when the groupId is set. The fix is that now we call shapeResult.OnGroup(context.GroupId); to ensure the shape is rendered with a provided groupId. Demos Security module The Security module right now is really focusing on security-related HTTP headers. Of course, you don't need a module for that or, you can write your own. You can just add headers directly, but the point here was to provide some defaults and secondly provide a way to easily configure them from the admin. This is especially interesting of course if you have a multi-tenant application and you don't want to hand-configure everything for everybody from code. First of all, you need to navigate to the admin UI of Orchard Core and enable the Security module under Configuration -> Features. After that, you will find a new option under Security -> Settings, called Security Headers. Here you see a UI to edit the Security Headers. The admin UI is not the only way to edit them, so just as with all these technical modules, it's also possible to configure it from the appsettings. There is also an example in the documentation of how to do that. The main sections are that we have content security policy-related headers (pretty much all of those, that are supported by browsers) and permissions policy headers, everything related to various peripherals, devices, etc. And finally, we also have one configuration for referrer policy. Let's try it out quickly! Let's say we set the referrer policy to Origin. If we open up the DevTools window of Google Chrome and navigate to the Network tab, you will see that the referrer-policy value of the response is now set to origin. If you like to use it check out the latest release of Orchard Core, and if you would like to know more about this new module, head to YouTube for a recording! News from the community Orchard Core Commerce MVP planning and survey A few weeks ago, you could see a nice demo about the Orchard Core Commerce module. And in that blog post, we also mentioned that Lombiq provides stewardship for this module. That actually means that we will do code reviews and work on features and fixes. To have that, Márk Bartha (who is the project leader from our side) started this thread and added this survey. This is about asking the community what the most important features for you would be in an Orchard Core-based e-commerce solution. If you do e-commerce or if you have an opinion about e-commerce, please share your opinion here. The point of this is to try to do not all the things but focus on what is really needed first. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 277 subscribers! We have started this newsletter to inform the community around Orchard with 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!

Orchard Core 1.4.0, Lombiq Base Theme for Orchard Core overview - This week in Orchard (03/06/2022)

We are thrilled to announce that Orchard Core 1.4.0 is now available! Check out this post to know everything about the latest release of Orchard Core! Now let's see the newest features and additions of the current release that we will continue next week too! Let's get started! Orchard Core updates Remove form tag from allowed tags during sanitization Now we explicitly remove the form tag when we do sanitization. The default HtmlSanitizerService doesn't do that, but for security reasons, the community decided to do it. The documentation has been updated as well, so if you want to be able to render the form tags, then you need to configure it. Set security stamp when the user is disabled Disabling a user should invalidate the user's security stamp. When the security stamp validator revalidates the cookie, the user will then be expired. Here you can see the new UserDisabledEventHandler, which calls the UpdateSecurityStampAsync method, to update the security stamp for the user who needs to be disabled. Ignore IUpdateModel and BuildPartDisplayContext in console_log The console_log on FlowPart shape returned logs of C# Runtime objects. To reproduce the bug, you had to follow these steps: Use {{ Model.Content | console_log }} or @Orchard.ConsoleLog((object)Model). Log model containing FlowPart. See the browser's log and find C# Runtime properties logged. The expected behavior would be to just log the shape-related properties and ignore IUpdateModel and BuildPartDisplayContext properties in console_log for shape JSON. Now you can see that the view models for editing and displaying the BagParts and FlowParts gets the IgnoreDataMember, and BindNever attributes to do not log these properties. Demos Lombiq Base Theme for Orchard Core A few weeks ago, we mentioned that our Base Theme for Orchard Core is officially released. After that, we showed how you can use the Resource Management feature to include assets based on different conditions easily and how to construct your home page menu structure using the main navigation name in the Base Theme. Our goal with this Base Theme for Orchard Core is to have all the common things that you usually do when making a theme, like setting up the layout and the zones, setting up variables and mixins, and so on. We hope this makes the whole theme development easier and faster for you. This time we just want to give you a short overview of the other useful features that you can get if you build your own custom Orchard Core theme by using our Base Theme for Orchard Core. The theme has some built-in zones (you have to run the Lombiq Orchard Core Base Theme - Layers and Zones recipe that creates these zones), which could be familiar to you if you used Orchard 1.x in the past because it has the same names as you faced with the default theme of the previous version of Orchard. The theme by default uses a front-end menu which is the same as the admin menu just uses the Main name instead of admin. The Layout.cshtml file of the theme automatically sets up the normal things like the viewport, language, etc, injects the Header, and injects the latest Bootstrap, so it actually overrides the one coming from Orchard Core with the one that you set up in your theme via npm. This is good if you need some features that are newer than the one in the release. You can also find a very tiny JavaScript helper that lets you have a ready event. It makes the library a little bit slimmer. If you would like to know more about this theme, head to YouTube for a demo! News from the community Orchard Core 1.4.0 Orchard Core 1.4.0 is now available! If you open up nuget.org and search for the OrchardCore.Application.Cms.Targets package, you will find the updated version of Orchard Core! There is a new page in the documentation with the breaking changes and the new features. Upgrade your solution to 1.4.0 now! Feel free to drop on the dedicated Gitter chat and ask questions or use GitHub Discussions! Orchard Core Commerce MVP planning and survey A few weeks ago, you could see a nice demo about the Orchard Core Commerce module. And in that blog post, we also mentioned that Lombiq provides stewardship for this module. That actually means that we will do code reviews and work on features and fixes. To have that, Márk Bartha (who is the project leader from our side) started this thread and added this survey. This is about asking the community what the most important features for you would be in an Orchard Core-based e-commerce solution. If you do e-commerce or if you have an opinion about e-commerce, please share your opinion here. The point of this is to try to do not all the things but focus on what is really needed first. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 275 subscribers! We have started this newsletter to inform the community around Orchard with 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!

Bootstrap 5 in the default Admin theme, Orchard Core Commerce survey - This week in Orchard (27/05/2022)

The default Admin theme now using Bootstrap 5, logging warning when a Zone isn't a Shape, adding documentation on Query API results changes and if you do e-commerce or if you have an opinion about e-commerce, please share your opinion with us by filling out this survey! Orchard Core updates Bootstrap 5 in the default Admin theme The Admin theme now using Bootstrap 5! The change only affects the Admin theme, there is no change in the built-in themes, you can use whatever Bootstrap version would you like to use there (or any other framework of course). If you open up the ResourceManagementOptionsConfiguration file in the Resources module, you can see that now you have the option to use the new Bootstrap version. Log warning when a Zone isn't a Shape You can't use both <zone> tag helpers and widgets for the same zone. If you have a widget in the zone, the content in zone tag helpers are ignored. Steps to reproduce the behavior: Create a new Orchard Core CMS Web App solution. Add a new Orchard Core Theme project. Replace the Views/Layout.liquid with Views/Layout.cshtml having the following content to keep it simple: @inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers@addTagHelper *, OrchardCore.DisplayManagement@addTagHelper *, OrchardCore.ResourceManagement<zone name="Footer"> <p>Hello from zone tag helper!</p></zone>@await RenderSectionAsync("Content", required: false)@await RenderSectionAsync("Footer", required: false) Launch and set up the web app. Go to /Admin/Themes, and select the newly created theme. Confirm "Hello from zone tag helper!" is visible on the home page. Create a zone "Footer" and a layer "Always" (boolean true condition). Create a widget content type with Html Body and add a new item with "Hello from Widget!" to the Footer zone. Go back to the home page. You only see Hello from Widget! and any tag helpers are ignored. The expected behavior would be that you should see Hello from zone tag helper!Hello from Widget! in the footer. From now, the code will log a warning instead of failing silently if the zone is not a shape. Here you can see the logging in the ZoneTagHelper and in the ZoneTag. Add documentation on Query API results changes If you called the api/query/{name} endpoint in Orchard Core 1.0.0, the query returned with the following schema: [ { "Id": 321, "UserName": "test", "Email": "[email protected]" }] If you upgraded to Orchard Core 1.1.0, this endpoint returns the data in a different format: { "items": [ { "Id": 321, "UserName": "test", "Email": "[email protected]" } ] } To make sure you handle the response correctly, the documentation of Orchard Core has been updated to reflect these changes. News from the community Orchard Core Commerce MVP planning and survey A few weeks ago you could see a nice demo about the Orchard Core Commerce module. And in that blog post, we also mentioned that Lombiq provides stewardship for this module. That actually means that we will do code reviews, and work on features and fixes. To have that, Márk Bartha (who is the project leader from our side) started this thread and added this survey. This is about asking the community what the most important features for you would be in an Orchard Core-based e-commerce solution. If you do e-commerce or if you have an opinion about e-commerce, please share your opinion here. The point of this is to try to do not all the things but focus on what is really needed first. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 271 subscribers! We have started this newsletter to inform the community around Orchard with 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!