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

Featured tags

IIS
API
SMS
All tags >

Enable/disable RSS feed per list, use WebApplicationFactory in the Lombiq UI Testing Toolbox - This week in Orchard (09/12/2022)

Enable/disable RSS feed per list, don't localize custom errors returned by the userinfo endpoint, reject grant_type=client_credentials token requests containing scope=offline_access, and a demo about using WebApplicationFactory in the Lombiq UI Testing Toolbox. Check out our post for the details! Orchard Core updates Enable/disable RSS feed per list After activation of the Feeds module, each List Part gets its public URL which can be accessed from the public and cannot be secured. List items can be intended to be private or handled in some custom way. If someone activates the Feeds module, it can leak that data through the newly added endpoint. So, this change is about adding an option to disable/enable feed generation for a given List Part. Let's try it out quickly! If you set up your site using the Blog recipe, you will get a Blog content type defined and one Blog content item. Navigate to Content -> Content Items and hit Edit near the Blog one! If you scroll down a little, you will find a new checkbox called Disable RSS feed link generation. It's unchecked by default but you can put a tick in this box to disable the RSS feed generation. Don't localize custom errors returned by the userinfo endpoint The OAuth 2.0 specification explicitly requires that errors be composed exclusively of certain USCII characters, which basically prevents localizing them. It's an issue we identified and fixed some time ago for the errors returned by AccessController, but not by UserInfoController, which still returned a localized error. Reject grant_type=client_credentials token requests containing scope=offline_access We recently added the ability to automatically grant the requested scopes for grant_type=client_credentials (which requires that the client be granted the corresponding scope permissions, of course), but we forgot to add a check to prevent a refresh token from being requested via scope=offline_access, which is a scenario we deliberately don't allow. We have a check preventing blocking grant_type=refresh_token requests in this case: Since there's no point in returning a refresh token that won't be usable, we should add a check to prevent the offline_access scope from being requested in the first place. That's exactly what this fix does. Demos Use WebApplicationFactory in the Lombiq UI Testing Toolbox Maybe you have already heard about the Lombiq UI Testing Toolbox, our web UI testing toolbox mostly for Orchard Core applications. Everything you need to do UI testing with Selenium for an Orchard app is here. We wrote about it several times here as well, first when we open-sourced it, when we added some Orchard Core Features tests to it when we added the automated monkey testing feature to it or when we introduced the Visual verification testing. And a few weeks ago, we showed you the latest updates about integrating UI testing into Orchard Core. In this recording, you could see using WebApplicationFactory directly instead of running the tested app with the dotnet CLI because you can run an ASP.NET Core app directly with WebApplicationFactory, see this blog post and the corresponding code. Why? This can potentially make things faster. Reduce the app-level configuration you have to do, so no need to add the Shortcuts module, for example, or ConfigureUITesting(). Since this would require a hard reference from the UI test project and the web app, we'd get rid of the necessity to manually build the web app. This would allow us to debug the app being tested too since it would be the same as the test process. We introduced this change in the v4.0.0 release of the UI Testing Toolbox, and if you are already using our Toolbox in your solution, don't forget to check out our migration guide for the breaking and non-breaking changes. And as always, if you want to know more about this new addition to the Lombiq UI Testing Toolbox for Orchard Core check out this recording on YouTube! News from the community 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 378 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!

Keep IDisplayManager backward compatible, adding permission check when querying content using GraphQL - This week in Orchard (02/12/2022)

Keep IDisplayManager backward compatible, remove extra spacing around editing contents, flows, and Bag Part, and add a permission check when querying content using GraphQL. Check out our post for the details! Orchard Core updates Keep IDisplayManager backward compatible Let's assume you are using BuildEditor of DisplayManager to create a shape. Now you will find method overload to avoid method not found exception in modules that depends on IDisplayManager. But why is that exception can happen? The BuildEditorAsync and UpdateEditorAsync methods in the IDisplayManager interface now accept a new htmlPrefix parameter, and the groupId is now not an optional one. To keep the IDisplayManager backward compatible, the old methods are marked as obsolete such that old compiled libraries use the obsolete methods, but new code knows it should use the new methods. Remove extra spacing around editing contents, flows, and Bag Part This change introduces some changes in the admin UI. We have some extra spacing around the Bag Part, Widget List, and Flow Part. There was also extra spacing around the create/edit form in the contents and the page title. The goal of this is to fix the inconsistent spacings and make the look and feel of the admin UI nicer. Add permission check when querying content using GraphQL Let's say you want to grant a user permission to be able to query their own content only using GraphQL. However, there seems to be no way to do that like we can do it using the UI. It would be nice to be able to apply the permissions as we do in the UI for GraphQL. So, here comes a new filter that honors their permissions. Also, GraphQLContentOptions.ConfigureContentType(...) had no effect. If the user configures contentType as hidden, we still show it anyway. This was also fixed. News from the community Orchard Harvest 2023 For those who are too young to remember, we had Orchard conferences, called Orchard Harvest. And the conference website was available under orchardharvest.org, but unfortunately, it's not anymore. The last one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference. The point is that we should really think about organizing the next one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part. If you have any feedback or you are looking forward to having a Harvest again, please share your opinion with us by filling out this survey about the upcoming Orchard Harvest! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 379 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

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

Fix content types fields dependency, implement ITicketStore for large cookies, fix OC version used in templates, and an upcoming talk from Lombiq about Orchard Core at the MS Tech Summit conference next week! Check out our post for the details! Orchard Core updates Fix content types fields dependency When we enable the OrchardCore.ContentTypes feature but not enable any feature that composes fields like OrchardCore.ContentFields, the Fields section shows up. Here we should remove the Add Field button when there are no field definitions. Also, if a currently attached field has no definition, we should not be able to edit it, but we should be able to remove it. This can happen if a field was attached to a content type/part while the field definition is available, but then the feature that provides the definition was disabled. Moreover, we should remove the Fields section from the UI if the current content type has no fields and also there are no field definitions. Let's say that we have a site installed with the Blog recipe. This recipe defines a content type called Blog Post which has several content fields attached. These fields are defined by the following modules: Content Fields, Markdown, Media, Taxonomies, etc. So, if we disable all of these features and navigate to Content -> Content Definition -> Content Types -> Blog Post and check out the Fields section, you will see that you can only remove the attached fields and not edit them, furthermore the Add Field button is missing because we have no content field definitions in our site, so, there is no need to display this button because it would only show you an empty list. Implement ITicketStore for large cookies You have the option as an admin user to create a custom role with lots of content types and provide custom permissions to the user. But it could mean that the logged-in user having custom permissions cannot access the admin section as authentication cookie size increases and some web servers have a limit on header sizes (e.g., IIS 16kb, Kestrel 32kb). This introduces the implementation of ITicketStore as an optional feature, when enabled, it will store all claims for the logged-in user on the server's in-memory cache or distributed cache instead of a cookie. Fix OC version used in templates The template default settings are generated on the build. These templates have an OrchardVersion argument that has a default value defined in an MSBuild script to be replaced with the Version property. In the release pipeline, this value will have the VersionSuffix applied to it, like the preview. This fix forces the value of the Version property to be the one in the tag which will prevent preview from being added. This will also fix the templates' default value for OrchardVersion. The pack command uses the Version property only for the packages, and at that point, the template JSON files are already built with the wrong version. News from the community Orchard Core at MS Tech Summit Are you involved in any area (from development to DevOps and cloud to architecture) related to Microsoft technologies? If so, the MS Tech Summit is the event created for you. Close to 50 keynotes, 25 Microsoft MVP award-winning speakers, expo, live streaming, and VoD, all free of charge. Zoltán Lehóczky from Lombiq will give a talk too, about building websites with Orchard Core. Check out the free online conference coming on 2 December to see his talk too! Orchard Harvest 2023 For those who are too young to remember, we had Orchard conferences, called Orchard Harvest. And the conference website was available under orchardharvest.org, but unfortunately, it's not anymore. The last one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference. The point is that we should really think about organizing the next one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part. If you have any feedback or you are looking forward to having a Harvest again, please share your opinion with us by filling out this survey about the upcoming Orchard Harvest! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 379 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

Add a feature to allow the user to manage tenants, integrating UI testing into Orchard Core - This week in Orchard (18/11/2022)

Let's continue checking out the newest features and editions of the 1.5.0 release of Orchard Core and see a demo about integrating UI testing into Orchard Core! Oh, and did you know that Orchard Core was presented at this year's .NET Conf too? Orchard Core updates Add a feature to allow the user to manage tenants Let's say you have an Orchard Core site set up with the Software as a Service recipe. This recipe allows you to easily create multiple tenants by enabling the necessary features. Here you can see that we have already created two additional tenants called Agency and Blog. We still need to set up the Agency one, but the Blog tenant is ready to go. And here you may notice a new button near the Blog tenant, called Features. By clicking on this button, you will be redirected to a page that allows you to manage the feature of the tenant called Blog. So, if you have a SaaS environment now, you can manage the tenant's features from the host by allowing to accept {tenant?} in the route. This tenant value is only evaluated if the request is running on the host. When a tenant value is present, we'll execute the code in the scope of the given tenant. SqlParser & SqlGrammar subquery support The issue was that the SQL parser did not allow subqueries in the FROM clause. Try to run the following SQL Query, which can be done via Search -> Queries -> Run SQL Query on the admin page of Orchard Core. SELECT Id FROM ( SELECT Id FROM Document) AS Temp The query should run, but instead of that, you encountered an error: Syntax error, expected: id_simple at line:0, col:15. And this has been fixed in Orchard Core 1.5. So, if you run the query with the latest release, you will see that the query was executed successfully. Update YesSql to 3.2.0 A new version of YesSql comes with the latest release of Orchard Core. YesSql now has version number 3.2.0, which provides several improvements and fixes since the latest version shipped with Orchard Core 1.4. Don't forget to take a look at the changes! Demos Integrating UI testing into Orchard Core We would like to show some updates related to integrating UI testing into Orchard Core. This was not the first time, we already talked about this a while ago in this post. And now it's taking shape, so we would like to have some feedback and finish it up together! In this demo, we will talk about this pull request which introduces UI testing to Orchard Core in .NET with Selenium with our library called UI Testing Toolbox. There's already UI testing in Orchard Core with Cypress, this is a bit different, these are not written in JavaScript but in .NET. They use other underlying libraries for browser automation and what will be tested here is a little bit different as well. We implemented everything that was in Cypress before, and there's a lot more now. If you are interested in the progress, you can find it in the PR as well. Now let's see the current progress of the integration! There's a new folder in the Orchard Core solution called OrchardCore.Tests.UI and also an OrchardCore.Tests.UI.Mvc. The Mvc one is just testing an MVC launch, there is no CMS functionality or anything like that and the Tests.UI tests the whole of the Orchard Core feature set. The main goal was to have some decent coverage. So, we are not waiting for an hour to wait for all the UI tests to finish but still, we can be fairly confident that if these pass, then we haven't messed up anything too badly. For example, we have tests for all the built-in recipes (AgencyRecipeTests.cs, BlogRecipeTests.cs, HeadlessRecipeTests.cs, etc.). The most complete one is under the BlogRecipeTests, which runs the whole setup and checks out the basic features of Orchard Core, like login, logout, registration, basic content operations, turning features on and off, etc. If you are interested in how to run these tests or what these tests actually do in action, check out this recording on YouTube! News from the community Orchard Core at .NET Conf 2022 .NET Conf is the biggest .NET virtual event and this year we were celebrating the release of .NET 7. And there was a talk called Build websites with a modern ASP.NET Core CMS – Orchard Core by Zoltán Lehóczky from Lombiq Technologies. In this session, we'll do a quick dive into working with the modern ASP.NET Core framework and web content management system (CMS) Orchard Core. We'll see what Orchard can provide you, how it goes beyond simple content management, and why you'd want to join such a cutting-edge open-source community. You can check out the recording of this session on YouTube! 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 381 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!

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!

Add a way to retrieve a UTC now DateTime in Liquid, Responsive Admin Theme - This week in Orchard (04/11/2022)

Add a way to retrieve a UTC now DateTime in Liquid, change the Query Schema editor to Monaco Editor, allowing multiple INavigationManager, and a demo about the responsive Admin Theme! Let's get started! Orchard Core updates Add a way to retrieve a UTC now DateTime in Liquid Orchard Core has a new Liquid helper called utc, which converts a local date and time to the UTC date and time based on the site settings. Let's say we type in the following expressions: utc: {{ "utc" | local | date: "%c" }}local : {{ "now" | local | date: "%c" }}local is the default : {{ "now" | date: "%c" }} This will appear as follows. You can see the current date time in UTC and in the site time zone as well. This new helper is also added to the documentation of Orchard Core. Change the Query Schema editor to Monaco Editor If you have a site set up with the Blog recipe, you have one predefined query, called RecentBlogPosts. You can edit this query under Search -> Queries -> All queries. And as you may notice, the schema editor now uses the Monaco Editor that powers VS Code too. Allowing multiple INavigationManager In the past, if you were trying to have multiple INavigationManagers, you could not do that because the TryAddScoped is replacing the existing implementations. So, to be able to have multiple INavigationManager implementations, you have to use TryAddEnumerable, which adds a ServiceDescriptor if an existing descriptor with the same ServiceType and an implementation that does not already exist in services. And here, you can see that the NavigationShapes class can now handle multiple INavigationManager implementations. Demos Responsive Admin Theme This demo is about a feature that you can see in this pull request to make the Admin Theme responsive. First of all, you can see that fields are listed with the title being at the start point, in this case on the left. So, if you have an RTL text direction, it will be on the right. The cool thing about this is that you utilize more of the width of the screen when the screen is large and you reduce the scrolling if unnecessary. But if you have a smaller screen, the labels go back to the top as what you used to see. We have the same thing for content parts as well. Here you can see how everything appears if you have a wide or a narrow screen. But not everybody may like to see the labels on the left like this, it means this is optional, and by default, nothing will change unless you explicitly change it. This one was done by adding a new StyeSettings section under the TheAdminTheme section to the appseetings.json where you can define classes. If you chose to utilize this, you can add a setting per tenant, and you can customize the look and feel of the Admin Theme for every tenant. And how does this work is the classes are placed by helpers. Let's check out the TitlePart.Edit.cshtml for example. As you can see, the GetLabelCssClasses() and GetEndCssClasses() Orchard helpers read the settings and apply the class names that you have provided in the appsettings.json file. This means that if you want to use this feature, your custom views have to be updated to utilize these helpers. And all the new built-in views of the source code of Orchard Core have to use these helpers in the future. If you would like to know more about this feature, don't forget to check out this recording on YouTube! News from the community 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 386 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!

Orchard Harvest 2023, User Notifications - This week in Orchard (28/10/2022)

Adding default form templates for the Default Theme, adding wrapper element for all content fields, demo about the User Notifications module and don't forget to fill out a survey about the next Orchard Harvest conference! Orchard Core updates Adding default form templates for the Default Theme Currently, all of the form widgets are rendered using Widget.cshtml which renders too much HTML without any added value. The goal here is to create default Widget-Form, Widget-Input, Widget-Label, Widget-Select, Widget-TextArea, Widget-Validation, and Widget-ValidationSummary templates. It means that now, you will find these default form templates if you open up the Default Theme. Adding a wrapper element for all content fields There is no easy way to hide/show content fields "label and input as a group" using JavaScript event because there is no wrapper element to select. The goal here is to add a wrapper element to all of the content fields to allow the user to easily hide/show the entire field block using JavaScript. Here you can see the editor of the Text Field where the wrapper has now new classes with ones that you can easily use to distinguish the same kinds of Text Fields from each other. For example, the Text Field called Subtitle of the built-in Blog Post content type has the following HTML structure. Here you can see that the third class and the ID contain the technical name of the Text Field, which makes targeting the given field easier. Adding GetPageSize method to account for MaxPageSize throughout the code Now we have a new GetPageSize method in the PagerOptions class that returns the maximum number of the allowed page size based on the values of the default and maximum page size numbers. And we are using the value coming from this method for every occurrence, where we are constructing the Pager by passing it as the second parameter. Which is the default page size in this case. Demos User Notifications The goal of the User Notifications module is to push notifications to the user, meaning notify the user somehow. There are many ways you can notify a user, one of them being a web notification, you can do SMS, you can do push to a mobile application, etc. In Orchard Core right now, there is no way to send notifications, but there is a way to send emails. Let's navigate to Configuration -> Features and enable the Notifications module. This will provide a way to notify users. After you enable this module, you will see a new bell icon near the Dark mode icon at the top right. If you click on that icon, you will see a list that shows you all of the notifications that you have right now. You can click on them to mark them as read, or you can click on All Notifications at the bottom, which will redirect you to the page where you can see all of your notifications. Here you can see a list of all of the notifications available. You can use the search here, and filter them only to see the read or the unread notifications. You can sort by recently created, or by previously created. You can also mark the unread notifications as read, mark the read notifications as unread or you can delete the notifications as well. You can also hit the Mark All As Read button to mark everything as read. Now let's see how you can generate notifications! Notifications can be generated via code by injecting INotificationManager. But you can also generate notifications via Workflows. Here you can see we have a workflow called Notify Content Owner, which contains the custom activities provided by the Notifications module. Here we put two events, one for when the Blog Post content item is published and one for when the Article is deleted. And here, you can also see the two new Notify content's owner activities as well. Let's check out the content of the first Notify content's owner activity! Here you can see we have proper Liquid support to customize the summary, and the body of our notification. If we open up the editor of the second Notify content's owner activity, you can see here we have some HTML code in the body as well. To be able to render the HTML properly, don't forget to put a tick in the "The body contains HTML" checkbox. And that's not everything! If you would like to know don't forget to check out this recording on YouTube! And if you want to try out this feature for yourself, you can find the code in this PR! News from the community 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 are you 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 381 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!