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

Featured tags

IIS
API
All tags >

Media Theme for Orchard Core, Orchard Harvest survey results - This week in Orchard (13/01/2023)

Fixing that FlowPart's widgets are not indexed in Lucene, migrating the OpenID module to OpenIddict 4.0, demo about the new Media Theme, and announcing the results of the Orchard Harvest survey! Check out our post for the details! Orchard Core updates Fix FlowPart's widgets were not indexed in Lucene FlowPart's widgets were not indexed with Lucene (even with all the necessary settings on the Parts and Indexes). Marco Serralheiro added a FlowPartIndexHandler that is basically a clone of the BagPartIndexHandler to solve this issue. Migrate the OpenID module to OpenIddict 4.0 This is about updating the OpenID module to use OpenIddict 4.0 RTM, which shipped in December. The previous versions - including OpenIddict 3.x - are no longer supported. While OpenIddict 4.x itself has many internal improvements, the "public" API hasn't changed much so the changes here are mostly cosmetic. If you want to know more about the latest version of OpenIddict, check out this great post from Kévin Chalet! Demos Lombiq Hosting - Media Theme for Orchard Core The Lombiq Hosting - Media Theme for Orchard Core repository contains an open-source project which will allow developers to host their themes in the Orchard Core Media Library, including templates and assets. The inspiration came from our public Orchard (Core) SaaS called DotNest. If you don't know it, you can use this site to sign up and get an Orchard (Core) site with two clicks for everyone. We don't vet who is signing up, so it should be safe, and it should be limited. But still, we want people to be able to have their sites as flexible as possible. And of course, there are a lot of built-in features in Orchard for that, you can do a lot from the admin. Part of the things you can do from the admin as well in a limited fashion is theming. There is the Templates module, if the developer or the operator of the application allows it then you can also upload CSS files and do all kinds of tricks. In the end, you can adjust the styling of your website. But we wanted to have something closer to the usual developer experience. And that is pretty much creating a theme for your DotNest site with the help of Media Theme for a tenant in a Saas, and that's what media theming is about. We have documentation about that here which contains a link to the DotNest Core SDK. This is what we will use in this demo! We also have automatic deployments either from the command line or from a GitHub Actions action if you will. You can fork the SDK or can work with an Orchard Core-based solution and create a theme (it needs to use Liquid). When you are satisfied, you can either create an import package by using the .NET Command line tool or, you can use Orchard Core's remote deployment feature to import the package on your production site. Or you can also use our GitHub Actions to deploy your theme. If you would like to try it out in your own SaaS, feel free, and if you have questions, please let us know! If you would like to have a DotNest site and use this feature, just sign up here! And of course, don't forget to check out this recording on YouTube to see the usage of the Media Theme in a site runs in DotNest! News from the community New websites using Orchard Core: the site of Capri Exclusive Homeware and the site of BagPortr Capri's purpose is to provide high-quality homeware to everyone, and BagPortr collects your baggage from your doorstep and checks it onto your flight. Both sites were developed by Gert Smith. If you are interested in more websites using Orchard and Orchard Core, don't forget to visit Show Orchard. Show Orchard is a website for showing representative Orchard CMS (and now Orchard Core) websites all around the internet. It was started by Ryan Drew Burnett, but since he doesn't work with Orchard anymore, as announced earlier, it is now maintained by our team at Lombiq Technologies. Orchard Harvest 2023 survey results For those 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. We created a survey, and now we have the results! Thank you for your feedback so far regarding Orchard Harvest! We have received a significant number of responses so far which has helped us to get a better idea of the right place and time. We have created a Discussion in GitHub where we described the possible dates and locations of the upcoming conference. Mike Alhayek also reached us saying he may have the right contact needed to facilitate the event in Las Vegas. Thanks, Mike! As we move forward, we will keep community members informed of the details, and you will also find every detail in this newsletter too! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 392 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!

Preserve browser Autofill for Bag, Flow, and WidgetList Parts, Lombiq UI Testing Toolbox - This week in Orchard (06/10/2021)

Preserve browser Autofill for Bag, Flow, and WidgetList Parts, remove unnecessary role attributes, Lombiq UI Testing Toolbox demo, and many more coming this week! Do you want to know more? Then don't forget to check out our current post! Orchard Core updates Preserve browser Autofill for Bag, Flow, and WidgetList Parts Currently, while editing a Flow/Bag/WidgetList Part, the HTML input IDs are based on the related embedded item IDs that always have different values. So we lose the browser autofill based on these HTML input IDs when editing another parent. So, here the idea is to generate IDs that are still unique while editing in the context of a given parent item, but that is the same while editing another parent content item of the same type. This is by generating IDs using a prefix composed of the part name of a given unique/named part, a delimiter, then a number equals the number of the current item. For the WidgetList Part, we also use the related zone name in the prefix. If you set up a site using the Agency recipe, you can check out the content of the Agency Landing Page content item, that has Bag Parts attached with prefilled data. Remove unnecessary role attributes Some HTML5 elements have implied WAI-ARIA roles so setting the implied roles on them explicitly is invalid HTML. Check out this link for more information: https://html-validate.org/rules/no-redundant-role.html. In the following screen, you can see some removals of the role attribute. Demos Lombiq UI Testing Toolbox The Lombiq UI Testing Toolbox is a web UI testing toolbox mostly for Orchard Core applications. Everything you need to do UI testing with Selenium for an Orchard app is here. UI Testing here is an automation that clicks through the web application in a browser. One of the most popular frameworks for that is Selenium, which does exactly that. You get an API to instruct a browser, and every major browser is supported. This UI Testing Toolbox providing a lot of features on top of Selenium for Orchard Core. Basically allowing you to UI test an Orchard Core application in a safe and parallelized way providing a lot of helpers, a lot of higher-level APIs allowing you to test your application with SQLite, with SQL Server with local media storage, or with Azure Blob Storage. And you can have a test e-mail sending with a local SMTP server too. Everything just works. Check out the highlights of the Readme.md file of this repository to see all of the features! How it works is also demonstrated in an example project which is part of our Open-Source Orchard Core Extensions full Orchard Core solution. Just clone that repository and find the solution folder called test in it. There is a Lombiq.Tests.UI.Samples project that contains several sample UI tests where you can see how to test your application. Let's check out the LoginShouldWork test in the BasicTests.cs file! As you can see, here we say that first, let's navigate to the /Login relative URL. Then find the UserName and Password form fields by their IDs and fill their content with the default username and password. After the test will find the submit button of the form and click on it. And if the retrieved user name of the currently authenticated user is the default user name, our test will pass! If you check the BrowserConfiguration file, you can see it can be used to provide some useful configuration values that can be used by the browser. For example, the value of the Headless property indicating whether the test will use the given browser in headless mode, provided that there's support for it. If you set it to false and run a given UI test by using the Test Explorer of Visual Studio, for example, you will see that the test will open up a browser where you can see the given test running. And we are just stretching the surface of the several features that you can have using the Lombiq UI Toolbox module! Don't forget to check out this recording on YouTube to see what else the toolbox can provide! News from the community Orchard Core Facebook Page Did you know that Orchard Core has its own Facebook Page? By following the Facebook Page, you can meet with new posts when a new Orchard Podcast or Orchard Demo has been uploaded to YouTube or when there is a new This week in Orchard post or any other important news or happenings around Orchard Core. The posts created on this page will also be shared in the Orchard Core User Group. Don't forget to follow the Orchard Core Page and join the Orchard Core User Group to be notified about the latest news around Orchard Core! New Lombiq team member: Viktória Magyar Viktória Magyar, our newest team member arrived! She is a developer but not Orchard Core this time, rather of our business! You can check out her full bio here! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 227 subscribers! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this week's Orchard meeting!

Add UsersFolder for media assets, Liquid IntelliSense for Monaco editor - This week in Orchard (18/08/2021)

Updating Monaco editor to have Liquid IntelliSense, new UsersFolder for media assets, a brand new Orchard Core website, and many more in our upcoming post! Orchard Core updates Add UsersFolder for media assets Open up the admin UI of Orchard Core and head to Content -> Media Library. Here you will find a folder called _Users. Under this folder, you can find three different ones where each folder has the name by an ID of a given user. The reason for that is, we have three users in the system right now who have access to manage the content of the media folder and the content of their own media folder. If you check the permissions page for one of the roles you will see some new permissions come from the OrchardCore.Media feature: Manage All Media Folders Manage Media For Others Manage Own Media These permissions allow administrator users to be able to manage the content of other user's media folders but can restrict others to manage just their folders. Users with the Editor role can only see and manage their own media folder. Note that this is just about managing media assets not hiding the files of the folder. Every user can see the image served under the https://localhost:44300/media/_Users/4dsckq969tr2czhkskgg9nw3mj/image.jpg but they cannot delete this file and cannot modify the content of the 4dsckq969tr2czhkskgg9nw3mj folder. On the left window, the administrator user can see all of the folders, but on the right window, an editor user can only see their folder. If you don't like the naming _Users for the folder under AssetsPath, you can easily use another name for that just by using the appsettings.json file to configure media. If you navigate to Configuration -> Media -> Media Options you will find the name for the Assets user folder as well. Liquid IntelliSense for Monaco editor We have several custom Liquid filters and tags in Orchard Core and when you would like to use these from the admin UI of Orchard Core, (like editing a template or an Html Field using the Monaco editor) that would be nice to have some help with the registered filters and tags. This feature is about adding IntelliSense for Liquid in the Monaco editor. Let's see how we can try it out! Here we have a site installed with the Agency recipe. That recipe contains a Content__LandingPage template for the Landing Page content type by default. If we start to type the {% shape %} expression, we will see a list that contains all the registered filters with the word shape in it. Flow alignment icon always render as left aligned Let's say we have a content type with a Flow Part attached. If you are using Flow Part, you have the option to put several widgets to it. You can also set the alignments of the widgets and the width of the widgets meaning you can put two widgets near each other and you can say that I want to put this widget on the left side of the row and fill the 66% of the row with it and I want to put this widget on the right side of the row and fill the 33% of the row with it. You can do that using a nice UI but there was a minor bug which was about the little icon of the editor wasn't reflect the alignment of the given widget. You can see that now the icon here shows that the second Html widget inside the Container widget is right-aligned. News from the community A new website using Orchard Core: City of Santa Monica Santa Monica is a beachside city of 8.3 square miles on the westside of Los Angeles County. Offering an environment of unparalleled natural beauty, the city is home to a mix of residential communities, commercial districts, and recreational venues. And now the website of the City of Santa Monica is here, built by using Orchard Core! Check out this brand new, amazing-looking Orchard Core site here! If you are interested in more websites using Orchard and Orchard Core, don't forget to visit Show Orchard. Show Orchard is a website for showing representative Orchard CMS (and now Orchard Core) websites all around the internet. It was started by Ryan Drew Burnett, but since he doesn't work with Orchard anymore, as announced earlier it is now maintained by our team at Lombiq Technologies. DotNest Core DotNest Core is a complete redevelopment of the DotNest platform, all on the latest version of Orchard Core. We've been running it with a couple of select few customers for a while now, and it's time to open it up a bit more. While you can't yet just simply create an Orchard Core-based DotNest site, you can sign up for our limited beta here. You'll soon be able to get a fully functional, reliably hosted Orchard Core site on DotNest where you can build your personal website or something to showcase your Orchard skills with. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 216 subscribers! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

How to fix "InvalidDataException: Form value count limit 1024 exceeded." in Orchard Core - Orchard Core Nuggets

Let's suppose you're building your shiny new Orchard Core website. In there you're also building a shiny new page, with Flow Part obviously. You throw together a lot of widgets to get all the bells and whistles on the page, then you save it and BAM! Internal Server Error: "InvalidDataException: Form value count limit 1024 exceeded." What's this, did I break Orchard? Is Orchard trying to break me? Let's fix this! The exception happens because the structure you've built with Flow Part is simply too large for the default ASP.NET Core limits. This is not something that would be too extreme to achieve, actually: If you have more complex widgets (with a lot of fields each) and you put several of them into a complex nested structure you can quite possibly build something by hand that would fail like this. Ask how I know! You can increase the limits restricting posted form value sizes, and in this particular case you'd need to change the ValueCountLimit value of FormOptions. Put this into the Startup class of your Orchard-based web app project (it won't work in a module or theme!): services.Configure This increased the limit to 4096, plenty more than the default. However, keep in mind that these limits have their uses: Malicious users could try to post large pieces of data to your server, trying to overwhelm it for example. So only increase this as much you only need! Note BTW that we're using the ASP.NET Core configuration API here, something which is also demonstrated in detail in our Training Demo Module, so follow up learning there! Did you like this post? It's part of our Orchard Core Nuggets series where we answer common Orchard questions, be it about user-facing features or developer-level issues. Check out the other posts for more such bite-sized Orchard Core tips and let us know if you have another question!