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

Featured tags

IIS
API
All tags >

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!

Remove the set as startup task button for non-event Activities, Lombiq Helpful Libraries - Source Generators - This week in Orchard (02/08/2024)

Fix WYSIWYG/Trumbowyg editor colors when the dark theme is enabled, remove the set as startup task button for non-event Activities, and a demo about the Source Generators included in the Lombiq Helpful Libraries are the topics for the week. Let's see the details! Orchard Core updates Fix WYSIWYG/Trumbowyg editor colors when the dark theme is enabled When dark mode is enabled, the Trumbowyg editor modals do not follow the dark theme and instead display in light mode. The foreground color of the WYSIWYG/Trumbowyg editor buttons is almost indistinguishable from the background color when hovered or focused. This inconsistency affects the user experience. The Trumbowyg editor modal should adapt to the active theme and display in dark mode when dark mode is enabled. This change fixes the Trumbowyg editor issues in dark mode by switching to the component's default theme for both light and dark modes. It also keeps a few custom CSS classes to ensure the borders match Orchard's styles. Remove the set as startup task button for non-event Activities You can set Task-type Activities as startup tasks on the workflow canvas. However, this doesn't make sense, since a Task can't start a workflow, only an Event can. The startup task button should only appear for Events. Also, the terminology "startup task" is incorrect as well, since it should say "startup Event". The goal of this fix was to remove the set as startup task button for non-event activities and rename the "Startup task" tooltip to "Startup event". To check this out, make sure that the Workflows feature is enabled under the Configuration -> Features option from the admin UI of Orchard Core. Afterward, you can head to the Workflows option to create a new workflow. We added a Content Created Event and a Notify Specific Users Task to our workflow. As you can see, we managed to set the Content Created Event as the startup event (it has a green background), but we cannot set the Notify Specific Users Task as a startup task because the "startup task" button is not available on the contextual menu of that task. Demos Lombiq Helpful Libraries - Source Generators The Lombiq Helpful Libraries contains various useful libraries that can be handy when developing for .NET, ASP.NET Core, and Orchard Core, to be used for your projects. The topic for this demo is the freshly added Source Generators library, a collection of helpful source generators. We concluded that when you include a vendor resource in Orchard Core, it's a good idea to include the version too, for cache busting. What we did before was manually set the version number of the scripts and styles we wanted to include in the Resource Manifest. We have to maintain this version number in two files; in the package.json and the ResourceManagementOptionsConfiguration class. So, the issue was about maintaining this in two places, and by introducing source generators we can do it in one go. The readme file of the Source Generators library shows you how you can use the ConstantFromJsonGenerator, which is a source generator that creates a constant from a JSON file. As you can see, first of all, you need to have a JSON file in your project and set the Build Action of the JSON file to AdditionalFiles. You need to reference both the Source Generator and the Attributes project and wherever you want to use the JSON file, make sure to have a partial class and add the ConstantFromJsonGenerator attribute to it. Here we tested this with the ResourceManagementOptionsConfiguration file of the Lombiq Vue.js module for Orchard Core. As you can see, the partial ResourceManagementOptionsConfiguration class contains the ConstantFromJson attribute where we defined a constant called VueVersion, provided the file name which is packages.json, and set vue as the property name. This means that we get the value of the vue property from the file called package.json and assign the value of this property to the auto-generated VueVersion string. And as always, if you want to know more about source generators, head to YouTube for a recording! News from the community Orchard Harvest 2024 Program The full Orchard Harvest program has finally arrived. This year’s program is packed with insightful sessions, engaging panels, and ample opportunities to connect with the Orchard community and to make Orchard Harvest the biggest Orchard Core event of the year. All sessions will be recorded and published on the Orchard YouTube channel after the event, so even if you can't make it live, you can see the sessions. However, being there live will allow you to ask the speakers, meet other community members, and have a lot of fun! All indicated times are local time in Las Vegas. After each session, you'll have a chance to ask questions, and we'll have a short break too. Here is a detailed schedule to help you prepare for the conference. Can't wait until September? Check out recordings from last year's special online Orchard Harvest on this YouTube channel here. Ready to be a part of something extraordinary? Reserve your spot today and take advantage of early-bird pricing at Orchard Harvest Conference 2024. Secure your spot today and get ready to level up your skills at Orchard Harvest Conference 2024! See you there! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 466 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

Orchard Harvest 2024 Program, Liquid syntax support for Correlate Task - This week in Orchard (19/07/2024)

Add target attribute to Menu, and Liquid syntax support for Correlate Task are the topics for this week. The full program of our Orchard Harvest conference, with all the speaker and talk details, is now out! Without further ado, let's dive in! Orchard Core updates Add target attribute to Menu In some cases, you may need to always open external links in new pages by adding optional target='_blank' to the Menus and AdminMenus. This change allows the user to specify the target property on both the Menus and the AdminMenus. Let's see how you can do that! Here, we have a site set up with the Blog recipe that adds a Main Menu option to the admin UI of Orchard Core. If you click on that and edit one of the Link Menu Items, you will find a new Target textbox, where you can specify the target attribute of the A tag. To be able to check out this for the Admin Menus as well, we need to head to Configuration -> Admin Menus and edit the nodes of the predefined admin menu called Admin menus. Just click Edit near any Link Admin Node and click inside the Target textbox. A context menu will appear that helps you to provide a valid value for the target. Liquid syntax support for Correlate Task The Correlate Task now uses the Monaco editor but only supports Script parsing. It would be nice to have an option to parse Liquid by selecting the syntax of the Correlate Task. This should default to Script parsing to be backward compatible. To check it out in action, we have to make sure that the Workflows feature is enabled under Configuration -> Features. We also enabled the HTTP Workflows Activities feature to be able to demonstrate this new addition to the Correlate Task more easily. After that, we can navigate to the Workflows option and create a new workflow. First of all, the startup event of our workflow will be an HTTP Request Event, which means if we invoke the generated URL, we can easily trigger our workflow. This is followed by a Set Property Task, where we set the value of the test property to "Hello Orchard Core!". And here comes the Correlate Task, where we set the Syntax to Liquid and the Value to {{ Workflow.Properties['test'] }}. And we close our workflow with the HTTP Response Task where we print the value of the CorrelationId in the following way: { "CorrelationId": "{{ Workflow.CorrelationId }}" }. Now it's time to trigger the workflow and see what will happen. As you can see, the CorrelationId property contains the value of our test property which we defined in our Correlate Task using Liquid syntax. News from the community Orchard Harvest 2024 Program The full Orchard Harvest program has finally arrived. This year’s program is packed with insightful sessions, engaging panels, and ample opportunities to connect with the Orchard community and to make Orchard Harvest the biggest Orchard Core event of the year. All sessions will be recorded and published on the Orchard YouTube channel after the event, so even if you can't make it live, you can see the sessions. However, being there live will allow you to ask the speakers, meet other community members, and have a lot of fun! All indicated times are local time in Las Vegas. After each session, you'll have a chance to ask questions, and we'll have a short break too. Here is a detailed schedule to help you prepare for the conference. Can't wait until September? Check out recordings from last year's special online Orchard Harvest on this YouTube channel here. Ready to be a part of something extraordinary? Reserve your spot today and take advantage of early-bird pricing at Orchard Harvest Conference 2024. Secure your spot today and get ready to level up your skills at Orchard Harvest Conference 2024! See you there! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 468 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

New Notify Specific Users Task, benchmarking documentation - This week in Orchard (14/06/2024)

New Notify Specific Users Tasks and the new Benchmarking documentation are the topics for this week. You can still apply to speak at Harvest 2024 and share your insights on Orchard Core's future, CMS roles, AI tools, cloud integrations, and more! Don't forget to join our next Orchard Core Pair Programming session, where we'll run through using Blazor as a decoupled front end for Orchard Core! Let's see the details! Orchard Core updates Benchmarking documentation There's a new page in the documentation of Orchard Core about benchmarking. To measure how fast Orchard Core is, we employ some benchmarking. Here, you can read some lines about the OrchardCore.Benchmarks project, where we have several benchmarks created with BenchMarkDotNet. You can also read about how to run benchmarks and how to check the performance of Orchard Core using ASP.NET Core Benchmarks. New Notify Specific Users Task In the past, we had a task called Notify User Task. By using this task, you could send a notification to the user who is available in the WorkflowExecutionContext when executing a workflow. Recently, the community modified this Notify User Task and renamed it to Notify Specific Users Task. The goal of this change was to be able to specify a user or a comma-separated list of user names (Liquid is also supported) who will be the recipient of the notification. Let's see how you can use this task in your workflow! First of all, you need to enable the Notifications and the Workflows features, which you can do under Configuration -> Features by using the admin UI of Orchard Core. The Notifications feature is needed because this will provide a way to notify users and to have the Notification Center. Now navigate to the Workflows option where we will create a simple workflow that will send a notification to a user when a Blog Post content item is created. The startup task of this workflow will be the Content Created event, where we filter on the Blog Post content type. The next one will be the Notify Specific Users Task. Here, we typed the AuthorUser text into the User names textbox. We previously created a user with the user name AuthorUser, which means that this user will get the notification. We also provided a subject and a summary. This means we are ready with our workflow, it's time to try it out. To do that, just create a new blog post. We used the admin UI of Orchard Core to do that. To be able to make sure that our workflow is executed successfully, we need to log in with the AuthorUser. To be able to navigate to the Notification Center, we need to click on the little bell icon at the top-right corner of the screen. Here, you can see that we have one unread notification with the subject and the summary that we provided when we constructed our Nofify Specific Users Task. News from the community Orchard Harvest 2024 date and location Get ready to power up your Orchard skills at Orchard Harvest Conference 2024! Join us on September 12th-13th at the Orleans Hotel and Casino in lively Las Vegas for two days packed with learning, coding, and community fun. What can you expect at Orchard Harvest Conference 2024? Hands-On Workshops: Elevate your coding game with interactive sessions led by industry experts. Insider Insights: Learn best practices, advanced techniques, and real-world insights from qualified developers. Global Connections: Connect with fellow enthusiasts, exchange ideas, and forge meaningful relationships within the Orchard community. Special Perks: Participants get exclusive discounts on accommodations at the Orleans Hotel and Casino. Can't wait until September? Check out recordings from last year's special online Orchard Harvest on our YouTube channel here. Ready to be a part of something extraordinary? Reserve your spot today and take advantage of early-bird pricing at Orchard Harvest Conference 2024. We also opened the registration form for the speakers: https://forms.office.com/e/fewh7hh20d This year's leading themes: Leading up to a v3.0, what will the future Orchard Core look like? What's the role of a CMS nowadays (with the decoupled/headless operating models, and AI development tools) Explore some advanced topics such as Shapes, Placements, Cloud Integrations, Performance, module extensibility, etc. Showcases on implementing Orchard Core in action. We've extended the sign-up period by another 2 weeks, so if you haven't signed up yet, you can still sign up now! Apply to be a speaker until the 29th of June, midnight Anywhere on Earth! We'll notify you whether your talk is selected for Harvest in 1 or 2 weeks after the application period. The chosen speakers will receive complimentary tickets for the event. Want to support our mission? Become a sponsor! Reach out to us at [email protected] or [email protected] to explore sponsorship opportunities. Secure your spot today and get ready to level up your skills at Orchard Harvest Conference 2024! See you there! Blazor and Orchard Core with Peter Matthews - Orchard Core Pair Programming by Lombiq We'll have the seventh session of Orchard Core Pair Programming by Lombiq! In these, we do an hour of pair programming with an Orchard Core community member about a project of theirs. We learn together a lot, share best practices, and write some good code. All this is live, and you can join us with your questions! Here, you can find the previous pair programming sessions, and here, you can find the stream for the upcoming one! See you at 5 PM UTC on the 17th! Peter Matthews joins us this time. We'll run through using Blazor (.NET 8) as a decoupled frontend for Orchard Core. From File → New Project to production, with instructions on project setup, and a walkthrough of a fully fleshed-out site. Your host and the "navigator" of the pair programming session will be Zoltán Lehóczky from Lombiq. Would you like to be our guest? Just let us know! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 472 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!

Add HTML support to notification summary; how to change the idle logout time in Orchard Core? - This week in Orchard (03/05/2024)

Add HTML support to the notification summary, implement local storage emulator support for the Amazon S3 Media module, and in our newest Orchard Core Nuggets post, we discover how to change the idle logout time in Orchard Core! Without further ado, let's get started! Orchard Core updates Add HTML support to the notification summary Let's say you need a way to be able to make notifications clickable on the UI. For example, you want to create a notification for when a content is published. When the user clicks on the notification, you want them to get redirected to the published content item. Currently, there is no way of doing that since we use the property Summary as an email subject which can't contain HTML. The INotificationMessage interface was updated to include the addition of a Subject field, which facilitates the rendering of notification titles. Moreover, the existing Summary field has been transitioned to HTML format. This adjustment enables the rendering of HTML notifications in both the navigation bar and the notification center. Consequently, HTML notifications can now be created, affording functionalities such as clickable notifications. Furthermore, the introduction of the NotificationOptions provides configuration capabilities for the notifications module. This structure comprises the following attributes: TotalUnreadNotifications: This property determines the maximum number of unread notifications displayed in the navigation bar, with a default setting of 10. DisableNotificationHtmlBodySanitizer: By default, the HtmlBody of notifications generated from workflows undergoes a sanitization process. However, this property grants the option to bypass this sanitization process. Implement local storage emulator support for the Amazon S3 Media module Following the docs, you can only use the Amazon S3 Media module with a real, online S3 resource. For daily development, especially in a team, using a storage emulator is better though. This is currently an issue only for the Amazon Media Storage feature. With the AWS SDK version we use currently, and due to us using virtual host addressing for buckets (i.e., mybucket.localhost, as opposed to path-style addressing with localhost/mybucket) this wasn't actually possible, so we needed to implement support for it too. If you open up the Orchard Core docs page, you will find a section that helps you configure a local emulator by setting up a ServiceURL. The page also mentions two tools known to work with the mentioned settings. News from the community Orchard Core Nuggets: How to change the idle logout time in Orchard Core In our latest post in the Orchard Core Nuggets series, we discover how we can constrain how long people can remain logged in: If they share a device, especially a public one, then it's better to be on the safe side and automatically log them out after some time of inactivity. Check out the other posts for more such bite-sized Orchard tips, and let us know if you have another question! Theme development with Zig - Orchard Core Pair Programming by Lombiq This is the very first session of Orchard Core Pair Programming by Lombiq! In these, we do an hour of pair programming with an Orchard Core community member about a project of theirs. We learn together a lot, share best practices, and write some good code. All this is live, and you can join us with your questions! This time, Ermir Pellumbi aka Zig will join us with a theme project. Your host and the "navigator" of the pair programming session will be Zoltán Lehóczky from Lombiq. Check it out here: https://youtube.com/watch?v=RdE6Io 5 PM UTC on the 6th! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 470 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!

Add a way to Remove User from a Role, Lombiq Hosting - Tenants Email Quota Management - This week in Orchard (15/12/2023)

New Get users by roles and Unassign users from roles activities, add async methods to ContentDefinitionManager to prevent possible thread starvation, and a demo about Lombiq's Tenants Email Quota Management module! Let's get started! Orchard Core updates Add a way to Remove a User from a Role This change introduces two new activities that you can utilize when working with workflows. The first one is called Get users by roles. Here you can easily choose the roles to identify users by using the Roles check boxes. You can see that you can provide a key (Output Key Name) that will be used to store the user's ID in a list that you can use in an upcoming activity in your workflow. The second activity is the Unassign user from roles one. The Roles check box works the same and the UserName text box can be used to provide the user name of the user who you want to update. Here in this silly example, we hard-coded the admin user name but of course, you can use Liquid to have a flexible activity. Add Async method to ContentDefinitionManager to prevent possible thread starvation The idea here is to make all the IContentDefinitionManager methods async to prevent possible thread starvation. To avoid a breaking change, the old ones were marked as obsolete. Here is a list of interfaces that were modified: IStereotypeService IStereotypesProvider IRouteableContentTypeProvider IRouteableContentTypeCoordinator IContentDefinitionService IContentDefinitionManager IContentDefinitionService On this screen, you can see the updated IContentDefinitionManager interface, where the non-async methods were marked as obsolete with a warning message that these methods will be removed in the upcoming releases. So, when you update your solution to the latest Orchard Core version, don't be surprised when you see some warnings after you build your solution. Demos Lombiq Hosting - Tenants Email Quota Management This demo will be about a new Orchard Core module, part of our Hosting Tenants repository, that helps you manage email quotas. Hence the name Email quota management, which could be useful if you have a SaaS provider (like our SaaS provider, DotNest) and you would like to restrict the number of emails sent out per month per tenant only if the tenant is using your SMTP provider. Of course, you don't want to restrict those tenants who are using their own SMTP provider. To set the quota you can use the appsettings.json file or an environment variable. The default value here is 1000 emails per month. Now it's time to try out this project and see it in action! The easiest way is to clone Lombiq's Open-Source Orchard Core Extensions solution. This Orchard Core Visual Studio solution contains most of Lombiq's open-source Orchard modules and themes, as well as related utilities and libraries, containing the Email quota management module too. First of all, you need to enable the Lombiq Hosting - Tenants Email Quota Management module under Configuration -> Features. After that, let's navigate to Configuration -> Settings -> Email. And wow, you can see that we have already sent 997 emails out of 1000 this month. Yeah, we cheated a little bit and we already sent out some emails using workflows. In this case, the users who have site owner permission will receive an email when the tenant reaches 80% of the available email quota for this month. They will get another email if you exceed 90% of the email quota. When you reach your quota for this month, you will get a red notification that can be seen on every page in the admin UI. It means that you will not be able to send out more emails until next month. As always, if you would like to know more about this module, head to YouTube for a recording! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 487 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!

Add a way to restart an instance of a workflow, Http Redirect to Form Location Task - This week in Orchard (17/11/2023)

Thumbnails for the media library, add a way to restart an instance of a workflow, and a demo about the Http Redirect to Form Location Task! Let's get started! Orchard Core updates Thumbnails for the media library In the media library, there are new icons and thumbnails for well-known file types using Font Awesome icons. Here, you can see the assets provided by the Blog recipe. When you are uploading a PDF or an XLXS file, you can see the new icons instead of the old ones. Add a way to restart an instance of a workflow Sometimes, a workflow instance can fail for some reason, for example, we have a workflow that sends an email and fails. It would be helpful if we could restart the instance. This change adds a button next to the Delete button named Restart. This takes the current workflow state and restarts it. As you can see here, we have a workflow called test with one faulted instance. If we hit the Restart button near the faulted instance, it creates another instance that can run successfully. To do that, there is a new RestartWorkflowAsync method in the IWorkflowManager interface, which starts a new workflow using the specified workflow definition. Each type of activity can implement custom logic when a workflow instance has been restarted because sometimes it needs to load some extra state. This can be achieved by implementing the OnWorkflowRestartingAsync and OnWorkflowRestartedAsync methods. For example, the ContentActivity now stores the content item version ID of the content item that triggered the workflow. It means when you retrigger a workflow, you can use the same version of the content item that you were dealing with before. Demos Http Redirect to Form Location Task This feature allows you to be able to put a form on a page and then somehow redirect back to that same page where we came from using a workflow. We already have a workflow task that allows us to redirect the user to a specific location, which is great if you know where you want to go back to. Like, if you want to go back to the home page, then you can always redirect the users to the home page. But what if you want to reuse the same workflow for multiple forms (or reuse the same form on multiple pages) and then when the user submits that form, go back to where they submitted the form from? There is no way to do that right now and that's where this demo came from. How can we redirect the user back to the page where they came from? Now let's create two forms, called the Q&A form and Contact Us, it doesn't matter right now. The thing that matters is they are both using the same URL to submit the form. So, we will have one workflow that will do something, then it will redirect the user back to the source form. Here, you can notice a new checkbox called Save Form Location. If we want to redirect the user back to this form, it's required to put a tick into this checkbox to store the location of the form. It's time to create our workflow! Here, you can see that the starting task of our workflow is an Http Request Event, followed by a simple Notify Task. The last task is a new one, called Http Redirect To Form Location Task. The last remaining thing to do is to set up our activities. As you can see, the Http Request Event has a new textbox with a label Form Location. It serves as a key that will be added as an entry to the dictionary of re-hydrated values provided to the initiator of the workflow, the Output of the WorkflowContext. Meaning we store the location of the source form under this key in the dictionary. As you can see, we need to use this key for the Http Redirect To Form Location Task as well. In a nutshell, the Http Request Event stores the source form's URL in a Dictionary with the provided QAContactUsFormLocation key, and the Http Redirect To Form Location Task will read the entry from the dictionary where the key is QAContactUsFormLocation. It allows us to store the location of the source form. And as always, if you would like to know more about this new feature, head to YouTube for a recording! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 485 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.7.1 and Orchard Core 1.7.2 - This week in Orchard (20/10/2023)

Orchard Core 1.7.1 and Orchard Core 1.7.2 have been released to address some issues of the 1.7.0 release. In our current post, we will check out everything that you should know about the latest release of Orchard Core! Check out our post for the details! Orchard Core updates Fix workflow page list issue when using PostgreSQL When a new Orchard Core 1.7 application using PostgreSQL is started, the Workflow page (/Admin/Workflows/Types) gives an error when opening. This error happened after upgrading a 1.6 project using PostgreSQL to 1.7. If you did a clean installation via the Orchard Core repo, you encountered this error again when using PostgreSQL. If you are using SQLite, this problem does not occur. The issue was in the following query that caused problems with PostgreSQL: "SELECT DISTINCT WorkflowTypeId FROM \"WorkflowIndex\"" After the fix, the query looks like the following: "SELECT DISTINCT \"WorkflowIndex\".\"WorkflowTypeId\" FROM \"WorkflowIndex\"" Set index length limit for MySQL Multiple exceptions were thrown when you started a new MySQL-based instance of Orchard Core 1.7, and of course, the expected behavior is to start the application successfully without any exception. The issue was the following. An index entry in MySQL can't contain more than 3072 bytes. With the current default utf8nb4 collation, this accounts for 768 chars. This means that all the fields that make up an index entry can't go over that, but only in MySQL. MySQL has a custom syntax to define the prefix size of an index, meaning the amount of data to use for each field. For instance, we can limit the Alias field size in the index with CREATE INDEX ... (DocumentId, Alias(50), ...), and then it would only take the first 50 chars even if the content is bigger. This way, we can have limits on the content itself, MaxAliasSize, but a distinct max size for the index. And we wouldn't need to constrain the field size to the index size for MySQL. In YesSql the columns names are injected as-is in the SQL Query:https://github.com/sebastienros/yessql/blob/c0771eb555c67bf419859016cb3563a3540fe7c7/src/YesSql.Core/Sql/BaseComandInterpreter.cs#L233 So, if we change the current migration to something like this, this would work as long as the sum of these constraints is less than 767 chars. SchemaBuilder.AlterIndexTable<AliasPartIndex>(table => table .CreateIndex( "IDX_AliasPartIndex_DocumentId", "DocumentId", "Alias(123)", "ContentItemId", "Published", "Latest")); News from the community Orchard Core 1.7.1 and Orchard Core 1.7.2 Orchard Core 1.7.2 was released a few days after the 1.7.1 one to address some issues of the 1.7.0 release. If you open up nuget.org and search for the OrchardCore.Application.Cms.Targets package, you will find the newest released version of Orchard Core! Upgrade your solution to 1.7.2 now! Feel free to drop on the dedicated Gitter chat or use the Discussions on GitHub and ask questions! Let's just quickly list the fixes that have been addressed in the latest release. If you click on each, you will be redirected to the related This week in Orchard post, where you can find more details about them. Position the modal over the navbar Two alerts are displayed in admin settings to reload the current tenant Add a fallback function to crypto.randomUUID Fix workflow page list issue when using PostgreSQL (current post) Set index length limit for MySQL (current post) Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 491 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!

New Catch Workflow Fault Event, interactive mode in the Lombiq UI Testing Toolbox - This week in Orchard (01/09/2023)

New Catch Workflow Fault Event, add additional text info to the Content Picker Field, and a demo about adding an interactive mode to the Lombiq UI Testing Toolbox! Check out our post for the details! Orchard Core updates New Catch Workflow Fault Event If you have the Workflows feature enabled, you can create workflows by clicking on the Workflows option from the admin menu. Here, you can create workflows and add events to your workflows by clicking on the Add Event button. In the list of available events, you will find a new one, called Catch Workflow Fault Event, that triggers and captures exception information when an exception occurs in any other workflow. If you select this event, you will find a text area called Trigger Condition, and the code inside it is automatically generated when you open the editor of the Catch Workflow Fault Event for the first time. Add additional text info to the Content Picker Field Let's play around a little bit with a site that we set up using the Blog recipe. First of all, we want to have an option where users can assign pages to blog posts, like "if you need more info, check out this page, or click here for this related content, and so on.". To do that, we can utilize the Content Picker Field. If we navigate to Content -> Content Definition -> Content Types and hit Edit near the Blog Post content type, we can find the Add Field button. By clicking on it, we can set the display name (let it be Related pages in this case) and select the field type (Content Picker Field). Now we can click the Edit button near our new Related pages Content Picker Field and do the magic here. We set up this field to allow multiple elements to be selected and said that we only want to choose from Page content types when working with this field. But the new stuff is the Title Pattern editor. Here, you can define the pattern used to render the title with Liquid support. Here, you can see that this field renders the Display Text of the content items by default (keeping the current behavior), but you can modify this as you want. This can be a huge help for other users because, for example, using only the display name has become a problem for multilingual sites with pages named "blog" in multiple languages. Here, we modified the pattern to include the display URL too, not just the display text of the content items. And now, the last step is to try this out in action! We will just simply edit the predefined blog post and click on the Related pages Content Picker Field to see what will happen. As you can see, we have two Page content items on our site where we used the sample display name. It's hard to distinguish the content items but by seeing the URL too, we have an idea which Page could be which one. OK, maybe we are not using the best URLs for illustration, but I think you get the point here. :) Demos Interactive mode 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, and when we introduced the Visual verification testing. At the end of last year, we showed you the latest updates about integrating UI testing into Orchard Core and the way you can use WebApplicationFactory or a fake video capture source. This time, we will check out a slightly different topic! Basically, the Orchard Core process and the UI testing process are running together, you can't actually do testing and continue running the web application itself. So, for that, we have a new method called SwitchToInteractiveAsync, which enables the interactive mode for debugging the app while the test is paused. If you run the test, you are able to pause at that point, like hitting a breakpoint when debugging the code. So, sometimes you want to debug the test session, and assuming direct control would be nice. But you can't just drop a breakpoint in the test, since the Orchard Core web app and the test are the same process so it would pause both. The SwitchToInteractiveAsync extension method opens a new tab with info about the interactive mode and, then causes the test thread to wait until you've clicked on the "Continue Test" button in this tab. During that time, you can interact with OC as if it was a normal execution. If you open up the InteractiveModeTests.cs file, you will find a demo of the feature with two tests: SampleTest and EnteringInteractiveModeShouldWait that illustrates how you can use the new SwitchToInteractiveAsync extension method. 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 535 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!

Add support for user phone number, SMS support and two-factor authentication using SMS service - This week in Orchard (25/08/2023)

Add support for user phone number; add styling to Pager in TheAdmin theme, and a demo about SMS support and two-factor authentication using SMS service! Check out our post for the details! Orchard Core updates Add support for user phone number Currently, we do not support PhoneNumber in the UserStore, which is supported in the default identity implementation, and it's a nice feature to have if you are implementing an application that requires the user to enter and confirm their cell phone number, similar to the way email verification works. The latter is easy since UserStore implements IUserEmailStore, but when using UserManager.GenerateChangePhoneNumberTokenAsync, the call fails with a NotSupportedException: Store does not implement IUserPhoneNumberStore<TUser> exception. From now on, UserStore implements IUserPhoneNumberStore, updating User accordingly by adding a Phone property. This means a phone number is now supported in the UserStore and the User object. Let's see what the new field looks like in the user's profile! If you navigate to Security -> Users and hit the Add User button, you will find the new Phone Number field there. You may notice a black exclamation icon at the end of the editor, meaning that the phone number for this user is unverified. Add styling to Pager in TheAdmin theme This change is about improving the look and feel of the Pager across the admin UI. New views in TheAdmin theme were added to style the pages at the theme level, no base shapes were altered. The pager looked like this: And after this change, it looks like this: Demos SMS support and two-factor authentication using SMS service In this demo, you can see a brand-new feature for Orchard Core, the SMS module. This module provides you with a way to have SMS services on your site, and then you can do whatever you want with them. There are actually three features around it, and we will check out all. SMS: Provides settings and services to send SMS messages. Two-Factor SMS Method: Provides users a two-factor authentication method through an SMS service. SMS Notifications: Provides a way to send SMS notifications to users. Let's enable all of them, and after that, you will find a new option under Configuration -> Settings, called SMS. Here you can configure your provider. You can choose from Log and Twilio. If you select the Log one, any message that is sent through the SMS provider will be just printed in the log files, like: "A message with the body {body} was set to {phoneNumber}". You can implement your own provider, but by default, we provide you with Twilio. Twilio is probably the most commonly used service. If you select it, you can configure it with the information that is coming from your Twilio account. So, this is the SMS module, and to build more on top of it, here comes the Two-Factor SMS Method feature. If you enable it, you can navigate to the Security settings, and add the new SMS authentication as a new two-factor authentication method. To do that, you have to verify your phone number, and you will get a verification code that you have to apply. The third feature is called SMS Notifications. With this module, you can actually deliver notifications through SMS. If you enable this and you can go to your user profile (Security -> Users), you will see another notification method here which is called SMS Notifications. And if you have the Workflows feature enabled, you can utilize a new task, called Send SMS, meaning you can send SMS messages directly from the workflow. 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 520 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!