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

Add Recipe Roles permission behavior, how to add media management to an ASP.NET Core app? - This week in Orchard (24/01/2025)

This week's topics are migrating the OpenID module to OpenIddict 6, adding Recipe Roles permission behavior, and we will mention our latest Orchard Nuggets post, where you can learn how to add media management to an ASP.NET Core app. Without further ado, let's dive in!

Featured tags

IIS
API
SMS
SEO
All tags >

Add stereotype as a filter for the contents UI, Updated Lombiq's Open-Source Orchard Core Extensions - This week in Orchard (30/06/2023)

Add stereotype as a filter for the contents UI, fix OpenID Configuration initialization and our Open-Source Orchard Core Extensions solution is updated to Orchard Core 1.6! Check out our post for the details! Orchard Core updates Add stereotype as a filter for the contents UI In some cases, we want to create a menu item that would allow the user to manage content items of a specific stereotype. Currently, we only support single content the type but not the stereotype. The goal of this change was to add a query parameter stereotype that would allow us to manage only content items that share the same given stereotype. To try this out, we have to have some content where the stereotype is defined. We will go the lazy way and edit the existing content definitions of the built-in content types defined by the Blog recipe. We can do that under Content -> Content Definition -> Content Types. We edited the definition of the Blog and the Article content type and set the stereotype value to Test. Now to be able to filter all the content items with the Test stereotype, let's navigate to Content -> Content Items and add the following query string to the URL: stereotype=Test, so the full URL in our case will be the following https://localhost:44300/Admin/Contents/ContentItems?stereotype=Test&admin=-327987887 And as you can see, Orchard Core shows us the content items of the content types where we set the stereotype to "Test". You can read more about this feature in the release notes of the 1.7 release of Orchard Core. Fix OpenId Configuration initialization When using the OpenId Server feature along with OpenId Validation and using a custom Authority value, the following exception was thrown: InvalidOperationException: The issuer attached to the static configuration must be the same as the one configured in the validation options. You can reproduce the issue by following these steps: Enable the OpenId Server and the Validation features. Set a new value in the Authority settings in server settings. The site becomes useless, and you'll get the above exception. And as you can see, the fix for this issue is quite interesting. But why would it work by applying these changes? Well, it's due to the fact the issuer comes from potentially multiple places: - The issuer configured in the validation options (options.Issuer).- The issuer attached to a static configuration (options.Configuration.Issuer).- The issuer attached to a dynamic configuration, retrieved using OIDC discovery (accessed via options.ConfigurationManager). Recent versions of OpenIddict use options.Issuer as the source of truth and now require that the issuer attached to a static configuration - which is the case when you target a "local" server - match the global value, options.Issuer. News from the community Updated Lombiq's Open-Source Orchard Core Extensions This is an Orchard Core Visual Studio solution that contains most of Lombiq's open-source Orchard modules and themes, as well as related utilities and libraries. Please keep in mind that only those extensions included that use the latest released version of Orchard (i.e., the very cutting-edge ones depending on a nightly build are not yet here). And now, this solution has been updated to the latest and greatest 1.6 Orchard Core version. Check them out here, and install them from NuGet or from the source! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 468 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!

FeatureEventHandler base class, settings to create robots.txt file from site settings - This week in Orchard (23/06/2023)

Checking ListContent permission instead of IsListable in the Admin Menu, new FeatureEventHandler base class, demo about new settings to create robots.txt file from site settings, and announcing our brand new Lombiq.com site! Check out our post for the details! Orchard Core updates Check ListContent permission instead of IsListable in the Admin Menu Currently, if you want to add a content type to an admin menu, the content type would have to be listable in order to be visible. Sometimes, we want to show a content type item on the admin menu even when it is not listable. The Admin UI does not care if the content type is listable or not. All it checks for is whether the user has permission to ListContent. The logic in the admin menu should be the same as the UI. And you can easily try this out if the Admin Menu feature is enabled on your site under Configuration -> Features. But if you set up your site using the Blog recipe, you will get a predefined admin menu which you can configure from under Configuration -> Admin Menus. Here, click the Edit Nodes button near the predefined admin menu and select the Add Node button after. This will show you a modal window with the available Admin Nodes. Let's select the Content Types one, which will add a link for each one of the selected content types. And this Create Node page now will list all of the content types defined by the Blog recipe (because we logged in with the admin user), not just the ones, which are listable. FeatureEventHandler base class This addition is about adding a new FeatureEventHandler base class which implements the IFeatureEventHandler interface. The goal here was to not have to define all methods when implementing IFeatureEventHandler as we already have with ModularTenantEvents and IModularTenantEvents. This PR also applies this change to the current implementations, like for the MediaTokenSettingsUpdater and for the RoleUpdater. Demos Settings to create robots.txt file from site settings One of the challenges that we had was that the only way we can expose the robots.txt for the tenants is by placing the robots.txt file on the file system of each site or globally. There was no easy way to modify that file per tenant. This feature is about adding an ability to drive the content of the robots.txt file through settings by using a middleware allowing website owners to easily define the directives for search engine crawlers and other web robots accessing their site. Now it's time to try this one out! Let's use the nightly build packages of Orchard Core and set up your site using the Blog recipe, for example. Now, head to Configuration -> Features and enable the SEO module, which provides SEO meta-features. After that, you will see a new option under Configuration -> Settings, called SEO. If you navigate to this page, you will see some things set by default, which is to add a rule to allow web robots and then add a rule to disallow web robots to the admin routes. And those are on by default if you do not have a robots.txt file. In the Additional rules editor, you can specify your custom rules. If you have special rules, you can define them here. Now if we check out the content of the robots.txt file, we can simply navigate to https://localhost:44300/robots.txt, because we only have the default tenant right now. But of course, if we would create a tenant called the agency, you will be able to check out the content of the robots.txt file for that tenant as well under https://localhost:44300/agency/robots.txt, for example. And as you can see, the file is generated based on our settings. However, people might already be using the robots.txt file. So, we can't really override what they have. So, if they have this file in the file system and the Static File Provider feature is enabled, we're going to take that file and ignore our settings. Because otherwise, this would be a breaking change. Another thing is the added rules for the sitemaps. If you go to the Features page, enable the Sitemaps feature, and navigate back to the SEO settings page, you will see a checkbox here called Include all sitemaps. What this does is it checks all the sitemaps that you might have; if any exist, it will automatically include them. And that's not all of it! If you would like to know more about this feature, check out the documentation and head to YouTube for a recording! News from the community Renewed Lombiq.com website We launched our website when we started Lombiq, no less than 10 years ago. It was simple, clean, and functional, but it didn’t age well with upcoming trends and looks of modern websites. But now we can showcase our expertise and services in a more modern and user-friendly way. To reach our goal, we migrated from our old Orchard 1 website to Orchard Core and modernized our site's look. Our new site turned out great, and we are very happy with it. It represents who we are and what we do as a company. We hope you like it too! For our case study on building the renewed Lombiq.com, including migrating it from Orchard 1, check out "How We Renewed and Migrated lombiq.com from Orchard 1 to Orchard Core" in the Lombiq blog. And we also added our site to Show Orchard, which is an Orchard CMS showcase, displaying Orchard CMS (including Orchard 1 and Orchard Core) powered sites from around the web. If you are interested in more websites using Orchard and Orchard Core, don't forget to visit Show Orchard. Show Orchard is a website for showing representative Orchard CMS (and now Orchard Core) websites all around the internet. Ryan Drew Burnett started it, but since he doesn't work with Orchard anymore, as announced earlier, it is now maintained by our team at Lombiq Technologies. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 467 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!

Orchard Core is in the Red Hat Ecosystem Catalog, Top-level Multi-Tenancy menu - This week in Orchard (09/06/2023)

New top-level Multi-Tenancy menu; adding docs about Common Part; and Orchard Core is now listed in the Red Hat Ecosystem Catalog. Check out our post for the details! Orchard Core updates Add top-level Multi-Tenancy menu Let's say you have an Orchard Core site where you already enabled the Tenants and the Tenant Feature Profiles features. By doing that you will have a set of functionalities that provides you with a way to manage tenants and their available features from the admin. These features are all related to multi-tenancy, related to tenants, and not to the other settings of the site where you can execute recipes, manage features or admin menus, and so on. So, this addition is about adding a new top-level menu called Multi-Tenancy and moving Tenants and Feature Profiles under the Multi-Tenancy menu. Add Common Part docs If you are not a newcomer to Orchard Core, you may know that the Common Part gives you the basics, like the owner and date-created fields. But in the past few days, someone asked a question on Twitter about how to do something, and the solution for the problem is to use the Common Part, which has some options that you can set to display the owner and the creation time, and so on. From now on, the Orchard Core Documentation site will contain a few lines about the Common Part. Orchard Core is in the Red Hat Ecosystem Catalog The Red Hat Ecosystem Catalog was built on Red Hat platforms and technologies with certified, enterprise-grade products you need to achieve your business outcomes. The developers of this catalog make it easy for you to explore and find certified products from this ample and robust ecosystem of enterprise hardware, software, and cloud and service providers. So, this is a catalog of software that is placed along their platforms. If you go there, you will find a lot of stuff here, but for .NET developers, there isn't much familiar here. These are like lower-level hosting/cloud/server-management applications mostly. There are some blogs and CMS systems, and the goal was to include Orchard Core in this catalog. Orchard should be compatible with Red Hat Enterprise Linux at least, and well, if we have it here, that's one more channel people can find Orchard. And that was the purpose of this GitHub issue, to improve Orchard's visibility in a circle where it's probably unknown, outside of the .NET community. And now we have Orchard Core listed in this catalog! And we also have a new page on the Orchard Core Documentation site about how you can manage the Orchard Core Red Hat Ecosystem Catalog certification! And if you would like to know more about this topic, check out this part of the community meeting! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 465 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 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!

Elsa Workflows, Orchard Harvest Online - This week in Orchard (02/06/2023)

Thank you, everyone, for taking part in Orchard Harvest Online, and thanks to the presenters for their great presentations! Check out our current post for a short summary of the conference; a demo about Elsa Workflows and many more! Orchard Core updates Admin Dashboard widgets are not scrollable when the content is long Last week we mentioned several improvements regarding the Admin Dashboard and the Admin Dashboard widgets. And we have another improvement for this week too! Currently, the Admin Dashboard widgets are set to hide any horizontal and vertical overflow. This works well when you can control the content of your widget based on specifying the best height/width of each widget. Sometimes you may want to create a widget without being able to control the length. For example, recent contents/posts, most viewed contents, etc. All these examples of a widget with uncontrollable content. In that case, it does not make sense to hide the overflow content vertically. We can still hide the horizontal overflow and the widget since that is something each widget can design for. But the vertical overflow should be set to auto. You can reproduce this behavior easily by creating a widget that lists the last 10 content items and making the size and the width of the widget 1 x 1. That's what you can see on the left side of the screen. And as you can see, when setting the vertical overflow to auto, we get a scroll bar for the widgets when the content is larger than expected. Fix the notifier cookie path Let's say we have an Orchard Core site installed as an application under the default website in IIS. What this means is that we access the site with the following URL: https://localhost/orchard. The problem is that the notifier cookie uses the tenant prefix as the cookie path. For example: For the default tenant, https://localhost/orchard, the notifier cookie path is set to / when it should be set to /orchard. For another tenant, let's call it tenantA at https://localhost/orchard/tenantA, the notifier cookie path is set to /tenantA when it should be set to /orchard/tenantA. Technically, scenario 1 still works, since cookies with a path of / can still be seen by /orchard. Even though the path isn't exactly what it should be, the notification still appears. The problem is in scenario 2, since the cookie path is being set to /tenantA but /orchard/tenantA can't see that cookie, and the notification doesn't appear. After applying this fix, the notification works for tenantA using /orchard/tenantA. Demos Elsa Workflows Elsa Core is a workflow library that enables workflow execution in any .NET Core application. Workflows can be defined using code and using the visual workflow designer. We mention Else here because Elsa is an innovative workflow engine derived from Orchard Core's Workflows module. It was born from a requirement of a project where they didn't want to base it on Orchard Core, but they did want to have Workflows. So, the goal here was to create a reusable designer that you can host/use in your own dashboard application. In this demo, Sipke Schoorstra, one of the main contributors of Elsa shows you everything that you need to know about Elsa Workflows. Head to YouTube for this exciting demo! News from the community Orchard Harvest Online We had the first online Orchard Harvest last Wednesday, and it was so great to see that we had 188 sign-ups for the conference! It was an excellent opportunity to share knowledge, talk about development plans and ideas, and foremost, meet the rest of the worldwide community. The conference was started by a Keynote from Sébastien Ros and followed by a talk from Andrii Chebukin about how you can use Orchard Core Framework for multi-tenancy apps. After that, Zoltán Lehóczky showed us how you can use open-source tools in the following areas: CI builds, static code analysis, unit and UI testing, and telemetry collection. And just before the breakout sessions, you can see a great session by Peyton McManus about why they selected Orchard for their new application. How his team has leveraged Orchard to rebuild and re-imagine the application, and how they will continue to leverage Orchard for their set of features. In the breakout sessions, the attendees had a chance to meet the speakers and other community members. Each speaker had a breakout room where the attendees asked questions and discussed the topic of their talk, or anything else Orchard Core related. After the break, we could see a talk from Hisham Bin Ateya about exploring different parts of localization stuff in Orchard Core. After that, Dávid El-Saig described the Orchard Core Commerce project's state and showed the current features. And the last talk was from Sipke Schoorstra where he provided an overview of Elsa Workflows' features, compared it to Orchard Core Workflows, and discussed integration possibilities. And of course, we recorded every session, which means they will be available on YouTube soon! Don't forget to follow our This week in Orchard newsletter to be informed about the recordings! That was a blast! Thank you everyone for taking part and thanks to the presenters for their great presentations! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 464 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!

Admin Dashboard improvements, Two-factor Authentication - This week in Orchard (26/05/2023)

Check out our current post to read about the latest Admin Dashboard improvements and to see a demo about supporting two-factor authentication in Orchard Core! And don't forget that Orchard Harvest is just right around the corner! Orchard Core updates Show Admin Dashboard shape when Access Admin Dashboard permission is not granted Currently, when the Admin Dashboard feature is enabled, the /admin route is handled by the Index action in the DashboardController controller. This works great when the user has the Access Admin Dashboard permission. However, when they don't, they get the generic forbid error message. In some cases, we don't want to give the user access to the admin widgets but want them to still access the admin dashboard. In this case, they will not be able to see the dashboard unless they type the exact path they want to access in the browser. The solution here was the following: If the user does not have Access Admin Dashboard permission, instead of showing 401, we now render the AdminDashboard shape. When a Dashboard Widget is secured, we check the permission to ensure the user is able to view it before rendering it. This will give us the ability to control who gets to see which widget. To test this out, first of all, we need to enable the Admin Dashboard feature. After that, we modify the permissions of the Editor role by saying users with this role have no permission to access the Admin Dashboard. After that, we added an Html Dashboard Widget to be able to see something instead of the empty dashboard. On the left side of the screen, you can see what the admin user can see. They have the Access Admin Dashboard permission, and the previously created Html Dashboard Widget is visible to them. However, on the right side of the screen, we logged in with a user who has the Editor role. As you can see, Orchard renders the "Welcome to Orchard Core" alert to them, but they can't see the Dashboard Widget or the Dashboard itself. Do not auto-create a dummy content item when the Admin Dashboard feature is enabled When the Admin Dashboard feature is enabled for the first time, for some reason, we create a dummy dashboard item. There is no way to avoid this for new tenants currently. Maybe adding a content item by default is not a good idea because the admin will almost always have to remove it. This change is about removing the sample Orchard Core Admin Widget from the recipe. But if you are curious about this sample widget, you can still use it. If you navigate to Configuration -> Recipes you will find a recipe called Admin Dashboard Widget Sample. And if you execute this recipe, you will be able to see the sample widget in the dashboard again. And this change was also added to the change logs of the next upcoming release to notify everyone about this change. Demos Two-factor Authentication Now you can have new settings that allow you to enable two-factor authentication. To see how this works, navigate to Security -> Settings -> User Login, where you can see a new tab, called Two-factor Authentication. If you put a tick into the Enable two-factor authentication checkbox, you will see the related settings. You can enable 2FA for everyone, you can enable 2FA for users with specific roles, or you can say to remember the client, so you don't have to keep typing the code every single time on the same computer. The Show email address in the authenticator app allows you to display the email address on the authentication app, otherwise, we will show your username. And the Require two-factor authentication option allows you to force authentication. If you log in, you will be forced to use 2FA. Right now, let's enable 2FA just for the users with the Administrator role. This means you will have a new option in the dropdown menu if you click on the user icon in the top-right corner called Security. Here, you can set up your authenticator app by clicking on the Add authenticator app button. Here you can set up your authenticator app by following the steps mentioned. Pull up your phone, open up the authenticator app, scan the QR code, and provide the verification code. On the next screen, you can see your recovery codes which you can use to log in in case you lose your device. But of course, you can reset your recovery codes and also the authenticator app itself under the Security dropdown menu. Now if we log out and log back in, Orchard Core will ask us to provide that code after we typed the correct username and password. And as always, if you would like to know more about this feature (which you can try out right now if you are using the nightly builds of Orchard Core) head to YouTube for a recording! News from the community Orchard Harvest Online Program As many of you know, we have been working hard over the past months to organize the next Orchard Harvest in Las Vegas after the last Harvest in 2017. Unfortunately, based on the current economic situation and personal feedback, Las Vegas won’t work this year. Not to mention that unfortunately Microsoft Build, announced after we decided on our dates, also falls in line with the original dates we chose. So, a date change was also necessary. However, we did not want to let go of this opportunity to meet completely. Therefore, we are pleased to inform you that we will be holding our first online Orchard Harvest starting on the 31st of May at 13:00 UTC. Start your registration for the event right now. You can find the program of the conference on the official site of Orchard Core. See you next week! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 462 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!

Orchard Harvest Program, Tenant Clusters - This week in Orchard (19/05/2023)

Allow displaying an icon for Custom Settings, add Admin Culture Picker docs, demo about Tenant Clusters, and most importantly, the program of the Orchard Harvest is now available! Let's get started! Orchard Core updates Allow displaying an icon for Custom Settings You can create a setting using Custom Settings and set the item icon in the menu that came with it. It wasn't really possible before this change because the .Id(type.Name.HtmlClassify()) and .AddClass(type.Name.HtmlClassify()) weren't applied in the AdminMenu of the CustomSettings module meaning it was not possible to override this menu item with a shape named NavigationItemText-NAME_OF_SETTINGS.Id. From now on, the CustomSettings module allows us to set the icon of the newly added menu item. Add Admin Culture Picker docs A few weeks ago, we mentioned that you have the option to add an admin culture picker for the admin site and have a dropdown in the admin panel header to switch languages. And of course, when adding new features to Orchard Core, we always keep in mind the flexibility and the reusability that Orchard Core can provide to the developers. Meaning, you can override and customize the shapes which are responsible to display the admin culture picker. Now we have some lines in the documentation about the two shapes that are responsible for displaying the admin culture. Demos Tenant Clusters This demo is about a work-in-progress feature for Orchard Core that distributes requests across tenant clusters using Microsoft Yarp.ReverseProxy. If you check out the following recording, you can easily get up to speed with the current state of this upcoming feature. Here we want to highlight some of the more exciting parts of this addition: We first use the Yarp Configuration to define Routes and Clusters with many options. Each Route is tied to a Cluster composed of Destination(s) on which load balancing can be applied. We only need one catch-all RouteTemplate and multiple Clusters on which we can configure a custom SlotRange[min, max] property (up to 16384 slots). Each tenant has a unique slot hash, so a unique Slot then belongs to the Cluster having the slot in its SlotRange. The Cluster can have multiple Destination(s). We could have used a Cluster having Nodes, but we follow the Yarp Config having a Clusters list of Cluster type. The same application can run as a proxy or behind it (we check the headers), the advantage with our distributed services is when as a proxy we are still aware of all tenant's data. So, on a request, we can use the same RunningShellTable to know the tenant, then select the right Cluster based on the tenant slot hash (in a custom middleware), and let Yarp selects one of its Destination(s). To compute a tenant slot hash, we use the CRC-16/XMODEM algorithm (same as Redis uses for clustering keys) applied on the new TenantId property, which allows us to automatically spread out new tenants on the slots and then on the configured Clusters. This knowing that the CRC-16 is fast to compute and always returns the same number for the same TenantId, so a tenant stays on the same Cluster. News from the community Orchard Harvest Online Program As many of you know, we have been working hard over the past months to organize the next Orchard Harvest in Las Vegas after the last Harvest in 2017. Unfortunately, based on the current economic situation and personal feedback, Las Vegas won’t work this year. Not to mention that unfortunately Microsoft Build, announced after we decided on our dates, also falls in line with the original dates we chose. So, a date change was also necessary. However, we did not want to let go of this opportunity to meet completely. Therefore, we are pleased to inform you that we will be holding our first online Orchard Harvest starting on the 31st of May at 13:00 UTC. You can start your registration for the event right now. And in the meantime, the program of the conference is available on the official site of Orchard Core! Please welcome the below selection of awesome talks by community members! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 458 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!

Fix for parsing plural entries in PO files with multi-line strings, Health Checks UI feature - This week in Orchard (12/05/2023)

Add post-install/update scripts to simplify package management, fix for parsing plural entries in PO files with multi-line strings, and a demo about the Health Checks UI Feature! Check out our post for the details! Orchard Core updates Add post-install/update scripts to simplify package management This simplifies the package process. Instead of defining a command to install each project, we use node script to find all projects/themes containing package.json and install/update it. With this addition, we no longer need to update the root package.json to add a command for every project we want to build. The new command node .scripts/install.js will be executed every time the npm install is executed. It'll apply the same command on every project in the solution that contains the package.json file. If you want to execute npm update on all projects, you can run npm run update-projects. If you want to run npm install on a specific project, you may execute npm run install-project {ProjectName}. For example, to install app packages in the TheAdmin theme only, you would run npm run install-project TheAdmin. Similarly, to update a project, you can run npm run update-project TheAdmin. Fix for parsing plural entries in PO files with multi-line strings When parsing a PO file with a plural message which also contains multi-line strings, the PoParser class incorrectly parses the message key as the concatenation of msgid and msgid_plural values. Example: msgid """Here is an example of how one might continue a very long string\n""for the common case the string represents multi-line output."msgid_plural """Here are examples of how one might continue a very long string\n""for the common case the string represents multi-line output."msgstr[0] """Here is an example of how one might continue a very long translation\n""for the common case the string represents multi-line output."msgstr[1] """Here are examples of how one might continue a very long translation\n""for the common case the string represents multi-line output." Parses as a single entry with a key: Here is an example of how one might continue a very long string\nfor the common case the string represents multi-line output. Here are examples of how one might continue a very long string\nfor the common case the string represents multi-line output. But the key to the translation should be the value of msgid: Here is an example of how one might continue a very long string\nfor the common case the string represents multi-line output. So, this fix is about adding a test for the PoParser class and fixing the bug in PoParser for plural entries with multi-line strings. Demos Health Checks UI feature A few weeks ago, we mentioned a module called the Health Checks module, which provides health checks for your website by displaying the status of some services by navigating to the given endpoint. Now, let's check out a new feature, called the Health Checks UI feature, which displays the statuses of the tenants and the statuses of some enabled features with a nice UI. When you enable it and navigate to the /health-ui endpoint, you will see this screen. It's the default tenant, meaning you can see the health checks of the current default tenant but also there is another option that allows you to see the health check of all of the available tenants by clicking on the Show Tenants Service Health button. And as always, if you would like to learn more about this feature, don't forget to check out this recording on YouTube! News from the community Orchard Harvest Online As many of you know, we have been working hard over the past months to organize the next Orchard Harvest in Las Vegas after the last Harvest in 2017. Unfortunately, based on the current economic situation and personal feedback, Las Vegas won’t work this year. Not to mention that unfortunately Microsoft Build, announced after we decided on our dates, also falls in line with the original dates we chose. So, a date change was also necessary. However, we did not want to let go of this opportunity to meet completely. Therefore, we are pleased to inform you that we will be holding our first online Orchard Harvest starting on the 31st of May at 13:00 UTC. You can start your registration for the event right now. Of course, we are still looking for speakers. You can apply to present by 12 May at the following link: https://forms.office.com/e/pfiExtEUuZ. Check out the details on the official site of Orchard Core! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 456 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!

Admin Culture Picker, Health Checks Module - This week in Orchard (31/03/2023)

Add Culture Picker for the Admin Site; a new version of Fluid, and a demo about the Health Checks Module! Check out our post for the details! Orchard Core updates Add Culture Picker for the Admin Site Unless you have a language switcher on website pages you cannot switch a language in the admin panel. This can be solved by having a dropdown in the admin panel header to switch languages. If you head to Configuration -> Features and type "culture", you will see two features: Admin Culture Picker which provides a culture picker shape for the admin area. Content Culture Picker which provides a culture picker shape for the frontend. The first one is the new one, so enable the Admin Culture Picker feature! After you enable this feature, probably nothing will change. But why? Well, that's because if your site only supports one culture, there is no need to display a culture picker to choose from the different cultures. So, let's navigate to Configuration -> Settings -> Localization and have at least two different supported cultures. After that, you will see the new dropdown in the NavbarTop zone of the admin theme which you can use to switch between cultures. Fluid 2.4.0 Fluid is an open-source .NET templating engine that is as close as possible to the Liquid template language. It's a secure template language that is also very accessible to non-programmer audiences. It also contains an ASP.NET Core MVC View Engine. And of course, Orchard Core is using Fluid too to generate templates. Fluid 2.4.0 has been released this month, so let's see some of the changes that this release contains! This release contains the implementation of some missing strftime formats. You can write: var source = "date:"{{Date | date:'%F %T.%3N'}}""; which results date:"2022-12-19 14:23:02. %3N". And as you can see, the %3N does not take effect. So, now all of these formatting parameters are implemented in Fluid meaning you can have more ways to print formatted dates. Like adding support for formats that will depend based on the first day of the week. Or if you ask for the number of weeks of the current day, then it might depend on what is the first day of the week. And there is a standard like Monday but sometimes you say that Sunday is the first day of the week. Another change is to introduce a "local" time zone for the time_zone filter. Meaning if you want to use a time zone that is the local time zone of the configuration (in Orchard it would be configured as the standard time zone), then you can use "local". Because you might get a UTC date and you want to display it with the local time zone. To do that, you can do: {{ now | date | time_zone: 'local' }}. Demos Health Checks Module For this demo, we will clone the following GitHub repository which contains a set of modules for Orchard Core CMS that is driven by the community members who love Orchard Core. This will encourage all the passionate developers to build modules that aren't included in Orchard Core. Such modules may be necessary for the community or essential for any sort of CMS. This repository contains several modules, this time we will check out the one called Health Checks Module, which provides health checks for the website. Orchard Core has a built-in Health Check module, the goal of this one is the extend the functionality of the built-in one. If you run this repository and enter the admin site using the admin username and admin@OCC123 password, you can navigate to Configuration -> Features and enable the Health Checks module. And while we are here, let's also ensure that the SendGrid module is enabled. But why? Because the Health Checks module is capable of checking the status of the SendGrid module. If you navigate to /health/sendgrid, you will see an Unhealthy message. Meaning that the SendGrid module is available and could be used without any issues but you have to configure its settings to make that service available for the users. Try to enable the Multitenancy feature as well and create a new tenant but do not set it up, just create it. After, head to the /health URL and see what it shows. Here you can find the status of SendGrid as before and another one called Tenants Health Check. As you can see, the name of the tenant that we have just created is Blog, but we haven't set it up (just created it), that's why you can see an Unhealthy status here. You can see the System Updates Health Check here as well because we enabled the System Module last week. And as always, if you would like to learn more about this module, don't forget to check out this recording on YouTube! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 434 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!

Enhance the Search module and UI, System Module - This week in Orchard (24/03/2023)

Ensure the Background tasks name is visible for old entries, enhance the Search module and UI, and a demo about the System Module! Check out our post for the details! Orchard Core updates Ensure the Background tasks name is visible for old entries In a recent change to the background tasks, a title was added to the background tasks. This works great for entries that have not been saved into the database. However, for entries that are already saved in the database, we do not have a title to show so it leads to no name being displayed on the UI. Since the title is not an editable field, we should always set the title to the default settings when showing tasks on the UI. Enhance the Search module and UI Currently, we have two different SearchController. Each one handles its own search provider, Lucence and Elasticsearch. We should be able to combine these two into one and place it on the Search module since that module's sole purpose is to export a front-end UI for the search. Also, we should add a setting to change the placeholder for the search bar. Additionally, we should have a Search Form widget that would allow the user to add a search widget. So, this update contains the following enhancements: Remove the SearchController from both Elasticsearch and the Lucene module. We now have one common SearchController in the Search module. The new controller now returns a shape instead of a view model which allows the user to override the default views. Adds settings to allow the user to define a title for the search page and also a placeholder text for the search bar. Add a Search widget that a user can add to their site. The default widget will direct the user to the /search route. Allow the user to optionally pass the index name in the route value. For example, /search/index-name the index-name is an optional value, and when it is not provided, the default index is used. Let's see some of the improvements mentioned in action! For this demonstration, we set up our site using the Blog recipe, and to be able to test the enhanced Search module, we have to enable the Search module itself and one search provider, which will be Lucene, for example. Now, we need to create a Lucene index under Search -> Indexing -> Lucene Indices. Here we added the name BlogPosts and included the Blog Post content type to the index. After that, we navigated to Search -> Settings -> Lucene and selected the BlogPosts search index as the default index to use for the search page and put a tick into the "Allow Lucene queries in search form" checkbox. Now we have a simple search set up, let's see the new Search Widget in action! We decided to place this widget on the home page. The predefined Blog content item is the home page in this recipe, so we edited the content definition of the Blog content type by adding a Flow Part to it. By having a Flow Part, we can add the new Search Form widget to the Blog content item. Here we can add some placeholder text if we want and can define the index name. Now it's time to utilize our widget! If we navigate to the home page of our site, we will see our Search Form widget. Let's type something and hit the Search button. As you can see, it lists our test posts which contain the "post" word. And you may notice the index name in the URL too (BlogPosts). If we had multiple indices, we can replace the BlogPosts one with any other existing index and that would mean that we search for something based on the content of that index. Remove .tiff from the supported images array Most modern web browsers, including Google Chrome, Microsoft Edge, Mozilla Firefox, and Opera, do not support the display of TIFF images natively on web pages. This is because TIFF files are typically very large in size and may take a long time to load. If you check out the MediaOrchardHelperExtensions class, you will see that the .tiff is now missing from the _imageExtensions. Demos System Module For this demo, we will clone the following GitHub repository which contains a set of modules for Orchard Core CMS that is driven by the community members who love Orchard Core. This will encourage all the passionate developers to build modules that aren't included in Orchard Core. Such modules may be necessary for the community or essential for any sort of CMS. This repository contains several modules, this time we will check out the one called System Module, which provides information about the currently running application; it can display the available system updates and put your site in maintenance mode while you upgrade. If you run this repository and enter the admin site using the admin username and admin@OCC123 password, you can navigate to Configuration -> Features and search for the "system" word. This will list the following features: System, System Maintenance, and System Updates. Enable them all! Now you will find a new option on the menu called System. Click on the Info under System! This page lists several useful information, like the ASP.NET Core Version, the OS Version, the Tenants, the enabled features, and so on. But you can find another option under System, called Updates. On this page, you can make sure that you are using the latest version of Orchard Core. If you are using the latest one (1.5 currently), you will see a "You're all up to date!" text, meaning there is no newer version of Orchard Core. And the third thing is the Maintenance mode. You can enable this mode by navigating to Configuration -> Settings -> System -> Maintenance and putting a tick into the "Allow maintenance mode" checkbox. If you do that and navigate to the front end of your site, you will see the page which shows you that the site is currently offline for maintenance. And as always, if you would like to learn more about this module, don't forget to check out this recording on YouTube! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 430 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!

Improved Feature Profiles feature, self-service tenant registration - This week in Orchard (03/03/2023)

Add placement example for dynamic parts, responsive Admin Theme, improve the Feature Profiles feature, and a demo about self-service tenant registration! Check out our post for the details! Orchard Core updates Added placement example for dynamic parts We have an article on the Orchard Core Documentation site that is about display management and placement files. Any module or theme can contain an optional placement.json file providing custom placement logic. This article describes the format of the placement.json file, how to render a shape, editor shape placement, and so on. Now you can see a new section here as well, telling you the structure of the placement file when you are working with dynamic parts. Responsive Admin Theme Last November, we mentioned that a huge improvement is coming to Orchard Core that makes the Admin Theme responsive. Note, that it's an option that is disabled by default, and you have to do some modifications in the appsettings.json file to make this work (under the StyleSettings section), and after that, your custom editors rendered in the admin have to support this, by utilizing the necessary helpers, like Orchard.GetEndCssClasses(). You can read more about how to set up the TheAdmin theme in the Change Logs of the upcoming release. Improve the Feature Profiles feature If a Feature Profile is renamed, it'll break existing tenants since the name is stored in the appsettings.json file, and also, other modules are not able to contribute to the Feature Profiles setup. We have had Feature Profiles for a long time now in Orchard Core, and if you haven't heard about it, you can check out a demo in this post. In a nutshell, this is about using app settings/configuration to add the ability to restrict the features and/or themes that are available to either a tenant and/or all tenants or a mix of both. You can add Feature Profiles under Configuration -> Tenant Feature Profiles once the Tenant Feature Profiles module is enabled. Here you can set the rules that you want to use. By default, you can have an Include and an Exclude rule. By using these, you can easily say that I don't want to allow the given feature for the assigned tenants or I want to allow my custom feature to the given tenants. The Expression contains the name of the feature, but it can include stars like OrchardCore.*Templates that will match the OrchardCore.Templates, OrchardCore.AdminTemplates and OrchardCore.ShortCodes.Templates feature as well. Let's say that we don't want to allow the TheAgencyTheme and the features with names that start with OrchardCore. and end with .Templates. And if you create a tenant, you can optionally specify which Feature Profile should be applied to the given tenant. You can rename the Feature Profile if you want, and renaming it could cause some issues. So, from now on when using Feature Profiles, we add an ID to the profile instead of using the existing editable name. This way renaming the profile won't break anything. To keep it backward compatible, we treat the current name as the ID for old entries. Note renaming old entries won't cause any issues since we consider the ID as the name before the new name is saved. If you check out the appsettings.json file of this tenant, you will see the ID here. And also, we allow the user to have multiple profiles more than explained in In a SaaS setup, how can the SaaS admin/owner manage the tenant features? Demos Self-service tenant registration In this demo, we can see a module created by Niraj Soni. He provides you with a new way to implement a site sign-up, so you actually create steps for someone to sign up, pay and get access to the tenant in a SaaS environment and everything happens right away. If you install the module, you will see a Registration Pages option in the menu under Multi Tenancy, where you can actually create the flow of the sign-up process. Here is a page called School, where you can capture school-related information using widgets during the sign-up process, like address, city, state, zip, etc. On another page, you can capture information to create an admin account, like user name, password, and email. There is also a step to verify email and capture payment. This contains integration with Stripe, so this will be utilizing Stripe. And finally, you can review and finish the whole process. Using this feature, you can add any page you want; you can remove a page if you want. And that's just the surface! If you would like to see this in action, check out this recording on YouTube! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 406 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!