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

Blazor guide for decoupled CMS, Workflow Trimming Task - This week in Orchard (06/09/2024)

Blazor guide for decoupled CMS, a new Workflow Trimming Task, and our renewed Orchard Dojo website are the topics for this week. You can still cast your votes for the Jean-Thierry Kéchichian Community Award! Only one week left until the Orchard Harvest conference! Let's see the news for this week!

Featured tags

IIS
API
All tags >

Orchard Core Commerce MVP, make Features module optional to non-default tenant - This week in Orchard (03/02/2023)

Make the Features module optional to the non-default tenant, add AddIndexProvider and AddScopedIndexProvider extensions, and a demo of the freshly released 1.0 version of the Orchard Core Commerce module! Check out our post for the details! Orchard Core updates Make the Features module optional to non-default tenant Currently, the module OrchardCore.Features are always enabled. We recently added a feature for the default tenant to be able to manage features on the behalf of any tenant. We can remove the AlwaysEnabled flag from OrchardCore.Features as the Saas owner may not want to allow the tenant to control their own features. It means this change allows to be able to not enable the Features module, such that only the default tenant can add/remove features even if there is an allowlist of features.This also introduces a breaking change which you can read about in the Orchard Core documentation containing the breaking changes of the upcoming release. Add AddIndexProvider and AddScopedIndexProvider extensions This change is about adding two new extensions that you can use in your Startup file to register your index providers in a simpler way. As a reminder, the IScopedIndexProvider is an index provider that will be resolved through DI in a scoped lifetime because it probably requires scoped services. Demos Orchard Core Commerce MVP Orchard Core Commerce will be an Orchard Core port and partial rewrite of the open-source Nwazet Commerce module that was built for Orchard CMS 1.x. Nwazet Commerce was initially built in 2012 by Bertrand Le Roy, loosely based on a commerce sample by Sipke Shoorstra. The initial goal of Nwazet Commerce was to power the website of the hardware startup Nwazet. While Nwazet is no longer operating, the Nwazet Commerce project went on and was further developed by a group of passionate contributors who are using the platform for their own, and their customer's websites. Like Orchard, Nwazet Commerce was built with extensibility in mind, and as such, it has its own extensions (typical examples include local tax and shipping modules). It's also a pure, idiomatic Orchard. Orchard Core represents a major evolution of the Orchard design principles and is sufficiently different that running Nwazet Commerce on it will necessitate significant work. As such, the community decided that starting from a blank slate was the best way to go, so they will port Nwazet Commerce piece by piece, being careful to accurately apply Orchard Core's new design principles. The community also decided to adopt a new name that gets rid of the now obsolete origins and establishes our ambition for the module to become the go-to commerce module for Orchard Core. Last May, we published a demo where you could see the current state of the module. A few months later we reached another milestone when we finished with the basic implementation of Stripe Payment integration (without taxation, shipping, etc.). Stripe is a payment service provider that business owners can use to accept dozens of payment methods, from credit cards to buy now, pay later services. Stripe Payments handles the steps between a customer providing their card information and learning that their payment has been accepted. And as you may know, Lombiq provides stewardship for the Orchard Core Commerce module. That actually means that we do code reviews and work on features and fixes. To have that, we added an Orchard Core Commerce MVP planning survey. This was about asking the community what the most essential features for you would be in an Orchard Core-based e-commerce solution. We had the results, we had a better understanding of what were the topics that made into the MVP as our short-term goals. And now we can proudly present the 1.0 release of the Orchard Core Commerce module! Let's see some of the key features of this brand-new release! You can try it out by cloning this repo or including the NuGet package in your own Orchard Core project. After you cloned the repo and set up the site with the Blog recipe, for example, you can enable all of the Orchard Core Commerce-related features to be able to try out everything that the module could provide to you. But you can run the OrchardCore Commerce - Development recipe on the setup screen, which will do the same. You can find several recipes under Configuration -> Recipes if you filter on the "commerce" word. By using these recipes, you can decide which features of the Commerce module you would like to utilize in your solution. By using these recipes, you can have a predefined Product content type, some sample content items, and everything that you might need when dealing with a commerce site. But as we mentioned, if you would like to see the whole of the Commerce module without doing any additional setup, the best is to run the OrchardCore Commerce - Development recipe on the setup screen. If you do that, you will get a Product content type with one TestProduct content item. In terms of taxation, you can set the gross price of the given product (the price with tax) and the tax rate. You also have simple inventory management, which means you can set the number of items in stock, and you can set the maximum and minimum number of this item one can order. You can also set up discounts if you want. For example, you can say that the discount percentage that is applied to this product will be 50 and you can also set up a beginning and expiration date and time of the discount. In case you want to limit the number of products that the discount can be applied to, you can also do that. Now let's check out what the user sees if they navigate to the display view of this product. As you can see, the price of this product is $10, and the gross price is $12.70 because of the 27% tax rate. We have 5 items in the inventory, and currently, we have a 50% discount. Meaning that the new price with a discount after taxes is $6.35. The MVP also comes with several settings that you can utilize under Configuration -> Commerce. You can set up the Stripe API under the Stripe API option, but you can see two new options here as well. But if you execute the recipe called Orchard Core Commerce - Samples - Custom Tax Rates, you will find another one here called Custom Tax Rates. Here you can add complicated tax handling based on the postal code, state or province, or country. The following screen means that if the country of the user is the United States, and the state or province is New York, the tax rate would be 4%. If the user has a Hungarian address (HU), the tax rate would be 25%. And you have just seen the basics of this release! If you want to know more about the Commerce module, check out the documentation page that contains the key features, and as usual, head to YouTube for a recording! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 390 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!

Build Version Display module, prevent Users feature from breaking when Roles feature is disabled - This week in Orchard (27/01/2023)

Add permission check for the content type filter, prevent the Users feature from breaking when the Roles feature is disabled, add new database options, and a demo about the new Build Version Display module! Check out our post for the details! Orchard Core updates Add permission check for content type filter The content type filter should only show accessible content types. The user should only see content types that they can view. Before this fix, all of the content types were listed, even if you don't have permission to see it. Let's say that I am an editor user who has no access to view the Blog content type. In this case, when this user navigates to Content -> Content Items and clicks on the content type filter, the predefined Blog content item will not appear in the list. Prevent the Users feature from breaking when the Roles feature is disabled This was an old issue in Orchard Core if you disable the Roles module, the site crashes because the Users module needs the following services to work: IRoleService RoleManager IRoleStore This issue is now fixed, and you can disable the Roles module from the UI without facing an error. You can find the implementation details in this pull request, thanks to Mike Alhayek! Add database options like TablePrefixSeparator, Schema, IdentityColumnType, and DocumentTable Here is a summary of the changes: both TableNameConvention and TablePrefixSeparator were removed from YesSqlOptions. The following properties were added to the ShellSettings of each tenant: TablePrefixSeparator when this value does not exist, we assume _, however, if an empty string is found, we use no prefix for the tables. Schema was added to allow you to provide a specific schema to use. IdentityColumnSize when this value is empty or invalid, we assume Int64. DocumentTable when this value is empty, we assume Document. If adding a new tenant failed due to missing Encrypt=false or TrustServerCertificate=True, we add the error to the log file to provide the admin with more about the issue. The following means that now you can find a new section in the configuration called OrchardCore_Data_TableOptions. Now you can define the name of the Document table if you want to change it, change the table name separator (changing the _ in tenant1_tablename), and the default identity column size, which is Int64 by default. Every existing tenant will work with Int32, but the new tenants will use Int64. It can happen because YesSql now supports Int64 as well. You can find some new lines about these settings in the documentation as well. If you want to migrate the existing tenants, you have to do your own migration. You can also define the schema of the tenant (DatabaseSchema) which is also configurable from the UI. This way all the table names are the same, just the schema that could be changed for each tenant. Demos Lombiq Hosting - Build Version Display The goal of the Lombiq Hosting - Build Version Display for Orchard Core module is to display the build version (i.e., .NET assembly version or other) on the admin of the Default tenant. By using this module, you can see at a glance which version of the app is deployed. But of course, there are various ways to know what's currently deployed into a specific environment (like staging or production), but the goal of this module is to cover the following use case: when you are looking at the app, you will know what's there. The only thing you have to do is to install the module, and navigate to Configuration -> Features, and enable the Lombiq Hosting - Build Version Display feature. After you navigate to the homepage of the admin UI, you will see the following on the dashboard. You can find the Orchard Core version, the version of the .NET assembly is currently being executed, which means the web application. If you have a CI build, usually that will generate a version number for you. And finally, during the build, you can also add a link to the build. This is just a dummy link for examples, but you can link to a GitHub action. You can read more about it in the Readme file of the module. Do you want to quickly try out this project and see it in action? Check it out in our Open-Source Orchard Core Extensions full Orchard Core solution, and also see our other useful Orchard Core-related open-source projects! And as always, if you want to know more about this feature, head to YouTube for a recording! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 396 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 1.5.0, adding Feature Profiles support to Auto Setup - This week in Orchard (11/11/2022)

We are thrilled to announce that Orchard Core 1.5.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 editions of the current release that we will continue the whole month! Let's get started! Orchard Core updates CultureInfo should not depend on local computer settings When the library sets the culture using the new CultureInfo(culture), you can get unexpected results if this is also the system's culture and data formats were customized. This could be a problem if the server wants one data format for internal administrative use that's different from the culture's canonical format. For example, you have an en-US server with a date format set to ISO 8601. Then if you want to display a date in Orchard Core with the site set to American locale, it will display it using ISO 8601, which is not what you'd expect. The site's internationalization should not depend on the local format settings. This repro assumes you have Windows 10 with en-US region settings: Steps to reproduce the behavior on Windows: Go to /Admin/Settings/Localization and make sure your site is en-US. Create a new view that contains @T["Date: {0:d}", new DateTime(2022, 02, 21, 12, 0)]. Navigate to it, you will see Date: 2/21/2022. Go to Start Menu > Settings > Time & Language > Region > Change data formats. Change the Short date to "2017-04-05". Restart the server. Visit the same page again, you will see Date: 2022-02-21. And as you may guess, the expected behavior is that you should still see: 2/21/2022. This means that from now on, you can use a new option coming from appsettings.json (IgnoreSystemSettings under the OrchardCore_Localization_CultureOptions section), which is about setting whether to ignore the system culture settings or not. Adding Feature Profiles support to Auto Setup The issue here was that the Auto Setup doesn't support Feature Profiles. The Feature Profiles feature allows the Default tenant to create Feature Profiles which can restrict the features available to a tenant with Feature Rules. Let's say you want to use Auto Setup to set up tenants automatically. You set the FeatureProfile property (like for ShellName, SiteName... "FeatureProfile": "standard-tenant") for a tenant as, it is used by Feature Profiles in Shell Settings. The feature profile is not used for tenant settings, only if you manually configure it from the Default tenant's admin, but the Auto Setup should apply the configuration. If you check out the documentation of the Auto Setup feature, you can see that now you can optionally pass the name of the feature profile used by default. Note, it's only applicable if the Feature Profiles feature is used. Add styles for common ASP.NET validation classes Currently, when we are using common HTML for validation the styles are not applied correctly. Here is an example of code: <div class="mb-3" asp-validation-class-for="DisplayName"> <label asp-for="DisplayName">@T["Display Name"]</label> <input asp-for="DisplayName" class="form-control w-md-25" autofocus /> <span class="hint">@T["Name of the type as it will be displayed on screens."]</span> <span asp-validation-for="DisplayName"></span></div> The <span asp-validation-for="DisplayName"></span> text should be displayed in red. This is because we are missing class styles for field-validation-error. Also, the <div class="mb-3" asp-validation-class-for="DisplayName"> doesn't have any visual distinction. This is maybe because we don't have any class styles for has-validation-error. We should at least provide default styling for these even though it might look "different". Also, at the same time, we should probably make sure that we are consistent in the way that we are implementing these validations throughout the entire Orchard Core admin forms at least. And here, you can see a screen with the updated styles: News from the community Orchard Core 1.5.0 Orchard Core 1.5.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. Upgrade your solution to 1.5.0 now! Feel free to drop on the dedicated Gitter chat and ask questions or use GitHub Discussions! Orchard Harvest 2023 For those who are too young to remember, we had Orchard conferences, called Orchard Harvest. And the conference website was available under orchardharvest.org, but unfortunately, it's not anymore. The last one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference. The point is that we should really think about organizing the next one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part. If you have any feedback or you are looking forward to having a Harvest again, please share your opinion with us by filling out this survey about the upcoming Orchard Harvest! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 383 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!

Lucene index rebuild and reset steps, Lombiq GitHub Actions - This week in Orchard (21/10/2022)

Lucene index rebuild and reset steps, update all action bars, utilize ContentTypeExtensions, and a demo about the Lombiq GitHub Actions project! Do we need to tell more about the content of our current post? Let's jump into the recent news of Orchard Core! Orchard Core updates Lucene index rebuild and reset steps Currently, when we are creating a search index from a recipe it doesn't build the index. This causes issues with Lucene and Elasticsearch where the Queries won't return any results, and also Elasticsearch will log an issue about "all shards failed" if nothing has been indexed yet in its indexes. It would be nice to be able to trigger an index to be rebuilt or reset from a scheduled background task as a one-time-only task. And from now on, you will find two new recipe steps that will help you with that: The Reset Lucene Search Index Step resets a Lucene index. The Rebuild Lucene Search Index Step rebuilds a Lucene index. You can find more information about how you can use these new recipe steps in the Orchard Core documentation. Update all action bars We have some improvements regarding the action bars on the admin UI of Orchard Core. As you can see on the screen below, there was a lot of wasted space between the search box and the New button. There was an extra round space between the filter icon and the search box and we also had uneven spaces, as you can see. The other thing is when using a mobile phone to manage contents (or any view with an action bar), the search input on the top shows up very small because of the wasted space between the search box and the New button. And here you can see the updated action bar. You can see that all of the mentioned issues are resolved like the search box is now longer, and we have equal spaces. Utilize ContentTypeExtensions We have had a static class called ContentTypeExtensions for a while now in the source, which contains several useful extensions. Like shortcuts to tell that the given content type is creatable, versionable, has stereotypes, and so on. Here the goal was to use the newly added extensions ContentTypeExtensions across the solution. Demos Lombiq GitHub Actions The Lombiq GitHub Actions project contains extensions that make a lot of things very easy in an Orchard Core or an Orchard Core-based project. If you don't know GitHub Actions or aren't entirely clear with the terminology, GitHub actions are GitHub's automation platform or CI/CD platform. Orchard Core of course also uses it to run various builds. And how you define a pipeline there is by creating workflows and/or composite actions. Workflows are what actually run, and actions are something that you can add on your own as well, these are things that workflows can call. Workflow is kind of like a program, and action is like a library that your program calls into. And of course, actions can be third-party as well. The point here is that you can use GitHub actions to automate a lot of things, like .NET builds, running tests, and doing various verifications on a pull request, and you can also do all kinds of modularization between these builds. And what we have under this project are workflows and actions. Workflows that you can call from your own workflows. Pretty much like one-liners, for example, to run the .NET build and execute a test. Actions are the building blocks that you can also use if you just want to have something specific. And we have quite a lot of actions and workflows here. Let's check out the workflow called Build and Test Orchard Core solution workflow! Here you can see how you use it. The example above is not even a minimal usage actually, it can be even shorter. This can be your GitHub Actions workflow in your own repository with an Orchard Core application, where you execute the workflow that we provide here. This is actually used in Orchard Core Commerce as well. If you check out the build-and-test.yml file inside the repository, you will find all the code that is necessary to run such builds. If you check out the details of a pull request inside the Commerce repository, you will see there are builds for Ubuntu and Windows as well. These are all the automated checks that we run. This is quite a long build because it's not just a .NET build, it also runs all kinds of static code analysis. It verifies that .NET packages are consolidated, and it also runs unit and UI tests with SQL Server and Azure Storage actually. And the Lombiq GitHub Actions projects contain a lot more than that! Are you interested in the details of what you can achieve if you use this project in yours too? If your answer is yes, or you want to know more about this automation platform check out this recording on YouTube for more! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 365 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!

New AddDataMigration extension, show the container's header for List Part - This week in Orchard (13/10/2022)

Add notes in the documents on how to configure YesSql, and show Bag Part content when the post request generates errors in the Bag Part. New AddDataMigration extension method, demo about showing the container's header for List Part, and many more are waiting for you in our current post! Orchard Core updates Add notes in the documents on how to configure YesSql We have a page in the Orchard Core documentation that describes how you can run SQL queries by creating a DbConnection instance and obtaining a custom ISqlDialect from IStore from the YesSql namespace in the YesSql.Abstractions package. Or how you can handle prefixed tables. Now this page has been updated with a new section that describes how you can configure YesSql by configuring YesSqlOptions. Show Bag Part content when the post request generates errors in the Bag Part Assume we have a content type (ex., Product) with a Bag Part attached. The user creates new or edits existing products and provides invalid data for items within the Bag Part. The post request fails validation which is great! However, the Bag Part will be rendered in a collapsed state. So, the user is left wondering where the error is until the user uncollapses the Bag Part and sees the highlighted error. The solution here is when rendering the Bag Part, we should uncollapse the Bag Part if there is an error in any of its contents. We can try this one out easily. Let's say we have a site set up with the Agency recipe (that recipe contains the Landing Page content type which has several Bag Parts attached) and edit the content definition of the Service content type. Here we edit the Icon Class Text Field and make it required. Now it's time to edit the predefined Landing Page content item and remove the value of the Icon Class from one of the attached Services. And as you can see here, the Service content type is uncollapsed, making it easier to identify where the error comes from. New AddDataMigration extension The goal of the new AddDataMigration extension is to shorten code like services.AddScoped<IDataMigration, CustomMigrations>(); to services.AddDataMigration<CustomMigrations>();. And if you open up a given Startup.cs file (in our case the one that sits in the AdminDashboard module), you will see the usage of this new extension. Demos Show the container's header for List Part There is a need to extend the look of the default List Part. This would mean that the buttons that allow you to edit the container content item itself and to add contained content items now will be placed in a new line on the top to make the search text box wider. These navigation buttons now appear on every page where List Part or Contained Part are used for easier navigation. Here you can see the updated page of the predefined Blog content item. And if you would like to edit the given Blog content item or create a new Blog Post, you will see these new buttons there as well on the top. But now let's edit the content definition of the Blog content type and hit edit near the attached List Part to edit the List Part itself. Here you can find a new checkbox with a hint "Check this option to show a header for the owning content." Let's put a tick in this checkbox and see what will happen when we navigate back to the list item's view. As you can see, now we have a new line here that shows the header for the owning content, meaning the header of the Blog content item, which just shows "Blog" in this case. This new line is also available on the page where you edit the blog content item itself and on the page where you create a new blog post. But let's do some tricks now! Let's say that we edit the definition of the Blog content type and add a new Media Field to it, called Logo. After we can edit our predefined blog content item and upload an image using our new Media Field. The header is simple by default, but we can override it easily using shapes! Let's say that we want to display that logo in this new line! To do that, we needed to create a new shape template called Content-Blog.Header.cshtml (we are using Razor and the technical name of this content type is Blog). Here you can see that this row contains two columns, and we would like to display the image that is selected by our Media Field called Logo in the first column. And now, the only thing to do is to navigate back to the admin UI of Orchard Core and check out the brand-new look of our Blog! If you want to try this out right now, you will find the code in this pull request. And as always, if you want to see a recording about this feature, this will be your video on YouTube! News from the community Orchard Core Commerce is now available on all DotNest sites Orchard Core Commerce is now available on all DotNest sites! A few weeks ago, we mentioned the current state of the Orchard Core Commerce module and one of the hugest improvements of adding Stripe Payment to the solution. And now you can start building your e-commerce site on DotNest! Check out our announcement for details here. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 355 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!

Smithsonian Folkways Recordings now upgraded to Orchard Core - This week in Orchard (06/10/2022)

Provide IConfiguration extensions to configure certain modules, replace StatusCode() when possible, demo about migrating Smithsonian Folkways Recordings to Orchard Core, and many more are waiting for you in our current post! Orchard Core updates GraphQL 4 Now Orchard Core uses GraphQL 4 instead of 2.4.0. The next step would be to update to GraphQL to 7.1.1, which is the latest release currently. Provide IConfiguration extensions to configure certain modules Several modules expose their configuration via IOptions<T> but only include site settings IConfigureOptions<T> for it: Email, Facebook, GitHub, Google, and Reverse Proxy Configuration. These could also provide extension methods like OrchardCore.Shells.Azure does with AddAzureShellsConfiguration() so the configuration can be easily provided by e.g., the appsettings.json file. And now we have these extension methods. If you check out the ConfigureEmailSettings extension method, you can see a sample for that which reads the settings from the appsettings.json file. This means the OrchardCore.Email module allows the user to use configuration values to override the settings configured from the admin area by calling the ConfigureEmailSettings extension method on OrchardCoreBuilder when initializing the app. Replace StatusCode() when possible We have some helper methods that can be used instead of returning StatusCode(). And there is also a new extension method called InternalServerError that produces an InternalServerError response. Demos Smithsonian Folkways Recordings Orchard Core migration For those who are unfamiliar with the Smithsonian Folkways Recordings site, the primary purpose is to showcase music and its cultural impact, as well as to provide related educational content. The news from the world of music is also available in the form of articles, and users can digitally purchase albums and other content as well. Additionally, users can also request licenses to use music for their purposes. The site was recently migrated from Orchard 1.x to Orchard Core and its process includes recreating and reimplementing everything present in the previous application as well as adding some important new features like UI tests. The home page serves navigation purposes for the most part. It shows the latest available content on the site, including new releases, artists, vinyl reissues, news, etc. You can also browse the site by filtering by genre, location, artists, or record labels. Users can use the License request form to request licensed music for their personal uses. You can navigate between the editor groups using the top navigation bar or you can also use the Back and Continue buttons. The data that the user enters is always saved when you click the Continue button, which is by design. There is a song search feature too that can be used to find the song which they would like to license. The registered users of the site can use the LDAP server and NetSuite login options as well for authentication so they don't necessarily need an Orchard Core user account to log in. One of the largest parts of the migration process is data migration which was handled by Jean-Thierry Kéchichian. If you are interested in how he did that or some other technical details, check out this recording on YouTube for more! News from the community Smithsonian Folkways Recordings now upgraded to Orchard Core As you can read, the Smithsonian Folkways Recordings now upgraded to Orchard Core, migrated from Orchard 1.x, and we worked a lot on it too! Here you can check out the case study about the migration process. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 356 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!

Content Relationships guide, Orchard Core Commerce Stripe Payment - This week in Orchard (09/09/2022)

It's time to publish the results of the Orchard Core Commerce survey and the topics that made it into the MVP as the short-term goals. And we have just added Stripe payment integration to the checkout process! Check out our post for the details! Orchard Core updates Content Relationships guide How can you relate (connect) content items to other content items in Orchard Core? When would you use each built-in option? This new guide aims to clear up the available options by detailing: Bag Part (BagPart) for Embedding Content Items within a Parent Item Content Picker Field for Many-to-Many Relationships of Specific Items Flow Part (FlowPart) for Building Structured, Responsive Layouts List Part for One-To-Many Hierarchical Relationships Taxonomies for Categorization and Tagging Demos Orchard Core Commerce Stripe Payment Orchard Core Commerce will be an Orchard Core port and partial rewrite of the open-source Nwazet Commerce module that was built for Orchard CMS 1.x. Nwazet Commerce was initially built in 2012 by Bertrand Le Roy, loosely based on a commerce sample by Sipke Shoorstra. The initial goal of Nwazet Commerce was to power the website of the hardware startup Nwazet. While Nwazet is no longer operating, the Nwazet Commerce project went on and was further developed by a group of passionate contributors who are using the platform for their own, and their customer's websites. Like Orchard, Nwazet Commerce was built with extensibility in mind, and as such, it has its own extensions (typical examples include local tax and shipping modules). It's also pure, idiomatic Orchard. Orchard Core represents a major evolution of the Orchard design principles and is sufficiently different that running Nwazet Commerce on it will necessitate significant work. As such, the community decided that starting from a blank slate was the best way to go, so they will port Nwazet Commerce piece by piece, being careful to accurately apply Orchard Core's new design principles. The community also decided to adopt a new name that gets rid of the now obsolete origins and establishes our ambition for the module to become the go-to commerce module for Orchard Core. And at the beginning of May, we published a demo where you could see the current state of the module. This time we will see a demo about the basic implementation of Stripe Payment integration (without taxation, shipping, etc.). Stripe is a payment service provider that business owners can use to accept dozens of payment methods, from credit cards to buy now, pay later services. Stripe Payments handles the steps between a customer providing their card information and learning that their payment has been accepted. You can try out the Orchard Core Commerce solution just by cloning the repository from GitHub, or you can download it as a NuGet package as well from NuGet.org. For this demo, we will set up our site by using the OrchardCore Commerce - Development recipe, which adds some built-in content to our site that we can use during development (and during our demo of course). After, we can head to Configuration -> Features and enable the three commerce-related modules: Orchard Core Commerce: Registers the core components used by the Commerce features. Orchard Core Commerce Session Cart Storage: Registers session-based shopping cart persistence. Orchard Core Commerce Settings Currency Selector: Currency selector that uses display currency configured in settings. Useful for Dev/Test scenarios. Now we can set up the Stripe API (Configuration -> Settings -> Stripe AP) by providing the publishable and the secret key. These keys are publicly available test keys, so feel free to use them for testing and development. The Readme.md file of the Commerce module also contains these keys. Now let's navigate to Content -> Content Items to check our predefined content items. The Product is a content type that can be added to the cart, and users can pay the price of the products. We have one, called TestProduct, let's add another one called Cheese. Here you can see we can set up the name, the SKU, and the base price of the product with the currency used as well. Let's say this Cheese will cost 4.50 USD. Now it's time to add the predefined product and the Cheese to the shopping cart! You can do that by navigating the details page of a product, and after setting up the quantity, you can click on the Add to cart button. Let's say we would like to add one Cheese and one TestProduct to our shopping cart. The shopping cart is available under the /cart URL, but the site will redirect you to this URL too, if you click on the Add to cart button. As you can see here, our cart contains two items: one TestProduct with a price of $5.00 and one Cheese with a price of $4.50, which costs $9.50. It's time to pay by clicking on the Checkout button! On the checkout page, you can set up your billing address and shipping address but let's focus on the credit card field right now, which comes from the Stripe API. You can find some credit cards in the Stripe documentation and in the Orchard Core Commerce Readme that can be used for testing different scenarios. Like handling a card that has insufficient funds or which has expired. But you can also use a card that requires 3D Secure 2 authentication. The 3D Secure standard - often known by its branded names like Visa Secure, Mastercard Identity Check, or American Express SafeKey - aims to reduce fraud and provide added security to online payments. 3D Secure 2 (3DS2) introduces "frictionless authentication" and improves the purchase experience compared to 3D Secure 1. It is the main card authentication method used to meet Strong Customer Authentication (SCA) requirements in Europe and a key mechanism for businesses to request exemptions to SCA. It means you cannot pay right away because you will see Stripe's own 3DS2 authentication panel. In live mode, you can see the bank's authentication panel here. If you click on the Complete button here, you can imitate that the purchase was successful. And in that case, the module will redirect you to a "Thank you for your purchase" page. And after a successful payment, a new Order content item will be created, which you can see on the content items list. Right now, the Order content item contains an automatically generated Order Id, a list with the charges (kind, amount, charge text, etc.), and the status of the order. The order contains the billing address and the shipping address as well. And that's not everything! If you want to know more regarding the current state of the Orchard Core Commerce module, don't hesitate to check out this recording on YouTube! News from the community Orchard Core Commerce survey results and MVP As you may know, Lombiq provides stewardship for the Orchard Core Commerce module. That actually means that we will do code reviews and work on features and fixes. To have that, we started this thread and added an Orchard Core Commerce MVC planning survey. This was about asking the community what the most essential features for you would be in an Orchard Core-based e-commerce solution. And now, we have the results and published an announcement of what will be in the MVP and the short-term vision of the project. Thanks to your feedback, we have a more straightforward impression of the community's priorities, and some new developments are already coming in. Feel free to check it out and join the discussion especially related to the bigger issues like taxation or discounts. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 345 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!

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!