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

Centralize the Indexing process, Remove Media files for a removed tenant when using Azure Blob Storage - This week in Orchard (20/06/2025)

This time, you can see a demo about centralizing the Indexing process and having a unified UI for managing Indexes and the Search Settings! But first, let's look at our other topics, like removing Media files for a removed tenant when using Azure Blob Storage, and adding RouteEndpoint cache. Don't forget that you can still fill out our Orchard Core Admin UI experience renewal survey to help shape the future of Orchard Core!

Latest tutorials

Featured tags

IIS
API
SMS
SEO
MCP
All tags >

Distributed cache, YesSql improvements - This week in Orchard (09/10/2020)

Get ready for the upcoming additions of Orchard Core! This week you can see demos about adding distributed cache to Orchard Core and the latest improvements of YesSql! Orchard Core updates Restrict Content Types Admin Node to only create the specified content type Let's say you have a site set up with the Blog recipe and your goal is to add a new admin menu that is about to list all the existing Article content items. To do that you have to navigate to Configuration -> Admin Menu and click on the Add Node button. Here you will need to select the Content Types Admin Node because you would like to add a link for each one of the selected content types from the list. And yes, you will only select the Article content type in the next screen. And that's it, you have created a new admin menu that lists all of the Article content items from the system. If you click on that you will see the list of the Article content items. Note that from now you will not see a filter here to filter by content types because that really doesn't make much sense. You created this Content Types Admin Node to list only the Article content items. If you would like to filter by content type, use the filter in the Content -> Content Items page as you would do it before. Remove ManageOwnMedia permission The ManageOwnMedia permission isn't handled today and we can replace it with the ManageMedia permission. So, now there is no separate permission to manage their own media or manage the media. It will be added back to the system again if the authorization logic is to be able to separate the user's media and the media uploaded by others. Right now, if you head to Security -> Roles and hit the Edit button near one of the Roles, you will see the missing Manage Own Media permission. Use a dropdown menu on the admin top navbar for the user menu The user menu on the admin theme is just about listing the user name of the currently logged-in user with a little icon near it. And there was a Log off link at the right side of the user name. It was just a piece of HTML code in the Layout.cshtml file of the default admin theme. From now the whole user menu gets its own shape, called UserMenu.cshtml. If you would like to override the user menu, you don't need to create a Layout.cshtml file in your admin theme, you just need to override the UserMenu.cshtml file. And if you check out this GIF, you will see that now the content of the user menu is placed in a dropdown instead of having it's content inline. Document release procedure Orchard Core is open-source that means you can check out and request changes to the source code, tell your opinion about it, and update the relevant documentation for that piece of code. Now there is a new page in the Orchard Core Documentation about how to publish a new Orchard Core release. These notes are primarily for Orchard's core contributors to guide them on how to prepare a new release, but if you just take a look at these you can now see what are the steps that need to be done to be able to ship a new release of Orchard Core. Add option to allow Lucene query syntax in the search There is a setting in the Lucene module that you can turn on and whatever you type in the search box won't be parsed as 'these are the words that I need to search on', but parsed as this is a Lucene query. You can use the Lucene query syntax in search forms, like the quotes, plus signs and things like this. But by default, it will still be like today, which is type words and it looks for these words. If you type stuff that has weird characters, they would be ignored. But how can I turn on that feature? Just navigate to the admin UI of Orchard Core, then find the settings in Search -> Settings -> Search (make sure you have enabled the Lucene module). Demos YesSql: Adding support for multi filters on the same table index There is a new method on .IQuery called .Or(), which starts a filter on a distinct table. This can be used for instance when the same index needs to be queried for multiple sets. It will actually add many filters on the same record of the index. With .Or() you can do now filters on different inner joins of the same index. Which means it will do unions of result with the filters. Let's check out the following unit test. [Fact]public async Task ShouldQueryMultipleIndexes(){ // We should be able to query documents on multiple rows in an index. // This mean the same Index table needs to be JOINed. _store.RegisterIndexes<PersonIdentitiesIndexProvider>(); using (var session = _store.CreateSession()) { var hanselman = new Person { Firstname = "Scott", Lastname = "Hanselman" }; var guthrie = new Person { Firstname = "Scott", Lastname = "Guthrie" }; session.Save(hanselman); session.Save(guthrie); } using (var session = _store.CreateSession()) { Assert.Equal(2, await session.Query<Person>() .With<PersonIdentity>(x => x.Identity == "Hanselman") .Or() .With<PersonIdentity>(x => x.Identity == "Guthrie")) .CountAsync()); }} This PersonIdentitiesIndexProvider will just map the first name and the last name of each person. We created two persons here that means the provider will be creating four PersonIdentity records. Two to store the first name and last name for Scott Hanselman and two to store the first name and the last name of Scott Guthrie. If without using the .Or() it will issue a query where the Identity == "Hanselman" AND Identity == "Guthrie", which will return nothing. With the .Or(), it will do an inner join on PersonIdentity with a filter on Identity == "Hanselman" and another inner join on PersonIdentity with a filter on Identity == "Guthrie". In this case, we will get both the two persons. It's like give me any person who's PersonIdentity has a record like Hanselman OR where the PersonIdentity equals Guthrie. Let's see another example! // Creating articles.using (var session = store.CreateSession()){ session.Save(new Article { Content = "This is a green fox" }); session.Save(new Article { Content = "This is a yellow cat" }); session.Save(new Article { Content = "This is a pink elephant" }); session.Save(new Article { Content = "This is a green tiger" });}using (var session = store.CreateSession()){ Console.WriteLine("Boolean query: 'pink or tiger'"); var boolQuery = await session.Query<Article>() .Where(x => x.Word.IsIn(new[] { "pink" })) .Or() .Where(x => x.Word.IsIn(new[] { "tiger" })) .ListAsync();} This is a full-text sample where in this case we can query documents by their content, by their words. If we have the documents as you could see in the code, we are creating an index for all the words pointing to the document, like green and fox points to the first Article. Now the query is about to give me all the documents that have pink in it OR all the documents that have tiger in it. The goal is to get the last two articles in this case. Let's check out this query: var boolQuery = await session.Query<Article, ArticleByWord>().Where(a => a.Word.IsIn(new[] { "white", "fox", "pink" })).ListAsync(); This query will return all the articles that have white AND fox AND pink in it and there is none in this case. You can find the recording of this improvement on YouTube! But wait a minute! Could this syntax be better? When you have a query, you can say .Any() and every predicate will be done in a different table. .Any() being an OR, and .All() being an AND. In this case, we're querying on the same index (ArticleByWord) but each of the calls on .With() will be a different projection, a different inner join in this case. Here we are looking for an article that has the word pink OR the words green AND fox. await session.Query<Article>() .Any( x => x.With<ArticleByWord>(a => a.Word == "pink"), x => x.All( x => x.With<ArticleByWord>(a => a.Word == "green"), x => x.With<ArticleByWord>(a => a.Word == "fox"))).ListAsync(); SELECT DISTINCT Document.* FROM DocumentINNER JOIN ArticleByWord_Document AS [ArticleByWord_Document_a1] ON ArticleByWord_Document_a1.DocumentId = Document.IdINNER JOIN ArticleByWord AS [ArticleByWord_a1] ON [ArticleByWord_a1].Id = ArticleByWord_Document_a1.ArticleByWordIdINNER JOIN ArticleByWord_Document AS [ArticleByWord_Document_a2] ON ArticleByWord_Document_a2.DocumentId = Document.IdINNER JOIN ArticleByWord AS [ArticleByWord_a2] ON [ArticleByWord_a2].Id = ArticleByWord_Document_a2.ArticleByWordIdINNER JOIN ArticleByWord_Document AS [ArticleByWord_Document_a3] ON ArticleByWord_Document_a3.DocumentId = Document.IdINNER JOIN ArticleByWord AS [ArticleByWord_a3] ON [ArticleByWord_a3].Id = ArticleByWord_Document_a3.ArticleByWordIdWHERE ArticleByWord_a1.Word = 'pink' OR ( ArticleByWord_a2.Word = 'green' AND ArticleByWord_a3.Word = 'fox') Here you can also see how does the query look like. That's the current syntax right now. And it's not breaking change because if you had .query.With().With(), it will still behave the same as before. It will be a single projection with two .With(). If you project on the same table it will be an AND on the same table, the same projection.If you would like to know more about the current syntax and the latest features, this is the YouTube video that you are looking for! Distributed Redis Cache There is a huge PR with a great addition to Orchard Core about having Distributed Cache in Orchard Core. In fact, this PR is related to all modules services using cached data that need to be in sync with a shared database, e.g. site settings and other admin settings, templates, queries, layers, and so on. Currently, in the dev branch, this is already the case for most of them but by using local memory cache entries that are invalidated through a distributed signal. This PR has changed this pattern by using a multi-level cache including a distributed cache. And Jean-Thierry Kéchichian made more services to be distributed aware, there are remaining things but could be done in other PRs. And recently he added the ability through a separate feature to also keep in sync tenant states, when you enable/disable/create/setup a tenant. To summarize: All services that were using the memory cache are now using a multi-level cache including a distributed cache, this cache is kept in sync with the database without using a message bus but document identifiers. We have concrete implementations of distributed services based on Redis, Redis cache, Redis data protection, Redis message bus, and Redis lock. In the current code, we never use a message bus/distributed lock. When enabling a concrete distributed cache in the default tenant, we automatically keep all tenants in sync through a hosted service, here also without using a message bus but identifiers. Here a stateless configuration is needed. There is a separate feature (DefaultTenantOnly) to keep tenants in sync. Don't forget to head to YouTube and watch the recording of this upcoming feature! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 160 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 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!

Content Picker Menu Item, Kast case study - This week in Orchard (02/05/2020)

Soon you will able to show content items in your menu easily! How? Check our newest This week in Orchard post and read about an amazing demo to see the new Content Picker Menu Item in action! We published a brand new case study this week on our website about the latest Orchard Core site we developed. By reading that study you can see the possibilities that you can easily achieve by using Orchard Core as your CMS! Don't forget to read our whole post for the most interesting news around the community! Orchard Core updates Added ability to restrict widgets within a flow part You can use the FlowPartSettings to give content managers the capability to restrict which widgets are available within the flow editor. If no widgets have been selected then all widgets will be available, as per the current implementation. Let's see it quickly! Set up a site with the Blog recipe and then edit the content type definition of the Page content type. To do that navigate to Content -> Content Definition -> Content Types and choose the Page. Then find the attached parts and hit Edit near the Flow one. Here you can select which content types this flow can contain. Just for the sake of demonstration, we say that the Flow editor of this page can only accept Liquid widgets. Let's see what will happen when we create a new Page! Hit New -> Page and try to add something to the Flow editor. You will see that only the Liquid one will be on the list because in the previous step we only allowed Liquid widgets. So, when you attach a FlowPart now you can decide what content types you want to be able to use in a FlowPart. It can be useful if you create a form page type with a FlowPart for it. You could then decide just to allow for form widgets. Remember: if you don't select anything you will be able to use any type of content type with the Widget stereotype in your editor. Added support for IN (SELECT) SQL statements You can use a custom SQL statement, that is about to parse for the queries module, the one that uses the generic SQL language and that will be translated to any dialect that the CMS supports (PostgreSQL, MySQL, SQLite, Microsoft SQL Server). If you use this language now you can use the select expression inside an in statement. It's also supporting the not in correctly and the like and not like was not working well, so these are also fixed. Check the new InlineData attributes added to the ShouldParseExpression test method to see some examples with the new expression. Fix shape table providers There was an issue with the way you would be able to override a template from your module, override a template for a dependent module. This change will look for shape templates in a module for any first-level dependencies and it's also improving performance because there would be fewer shape templates loaded in the memory. And if you have a feature depending on another feature then it won't be able to override the second level feature, you have to depend on that. It makes sense because you are creating a template for the second level feature, so you can depend on that because you expected that it would be there. Deployment plans search Let's navigate to Configuration -> Import/Export and create one or more deployment plans. Here you can filter the deployment plans and also do bulk actions. To do bulk actions select two or more deployment plans and after that, you will see the Delete option in the Actions dropdown. Content culture picker shape documentation If you navigate to the Content Localization section in the Orchard Core documentation, you may have noticed that there were no Razor example codes. From now the documentation has been improved with Razor examples! Demos Content Picker Menu Item Let's set up a site with the Blog recipe, create a new Page, and call it My brand new page. Then choose the Main Menu option in the admin UI and hit the Add Menu Item button. Here you could see the Available Menu Items modal window with two options: Link Menu Item and Content Picker Menu Item. Let's choose the second one! The Content Picker Menu Item is about having the ability to choose from the content items available in the CMS with a content picker. There is the Selected ContentItem dropdown, that can be used to select the content item that you would like to show on the menu. You can type to search or just simply select your item from the list. We will select our newly created page here. Publish the menu and navigate to the homepage of your site to see your menu. We placed the new menu item after the About, but of course, it's your choice to set the position of your menu item. If you are interested in the full demo don't forget to watch the recording on YouTube! Note that this feature is under development and can be found in this branch! News from the community Orchard Nuggets: How to add a culture URL segment for localization in Orchard Core So you're building a localized Orchard Core site and want all URLs to be in the form of /culture-name/rest/of/the/url, e.g. /hu-HU/my-page. What do you need to achieve this? In our newest Orchard Nuggets post, we give you the answers! Check out the other posts for more such bite-sized Orchard tips and let us know if you'd have another question! Helping Kast build a multi-tenant platform on Orchard Core Kast is an Australian company and one of their primary goals is to implement the Kast platform with the Kast Group Finder component. We worked together with Seth Cleaver (Co-founder and Director of Kast) on this tool to be able to create an intuitive self-service process that enables people within a church to easily find a suitable group to attend, simplify the administrative processes required for getting people into groups, and provide information to the group co-ordinators that might assist in planning and measuring effectiveness. Check out this case study about how we've developed this multi-tenant social group management platform for churches! 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 Core Training Demo module: combining ASP.NET Core Options with Orchard Core site settings Our Orchard Core Training Demo module has a new tutorial on combining ASP.NET Core Options with Orchard Core site settings. In the SiteSettingsController you could see how to use the Site Settings to access tenant-level settings and any other custom settings! Orchard Core Training Demo module is a demo Orchard Core module for training purposes guiding you to become an Orchard developer. You can use this module as part of a vanilla Orchard Core source that including the full source code - which is the recommended way. You can use it as part of a solution the uses Orchard Core NuGet packages, however, it's harder to look under the hood of Orchard Core features. The module assumes that you have a good understanding of basic Orchard concepts and that you can get around the Orchard admin area (the official documentation may help you with that). You should also be familiar with how to use Visual Studio and write C#, as well as the concepts of ASP.NET Core MVC. Bug reports, feature requests, and comments are warmly welcome, please do so via GitHub. Feel free to send pull requests too, no matter which source repository you choose for this purpose. Updated Lombiq Technologies logos You may have noticed that we rolled out our updated logo in the last few days. The spirit is the same: The lab flask with which we distill our IT solutions ("lombik" in Hungarian means lab flask :)). So, please welcome it! Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in the coming months, between May and September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Lombiq's developers will also give two workshops, on using Orchard from the admin UI and on developing a module. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 140 subscribers of the Lombiq's Orchard Dojo Newsletter! 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 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!

Scoped Liquid TemplateContext, Template Azure Blob with Liquid - This week in Orchard (10/01/2020)

Updated Trumbowyg plugin, configure your Azure Blob and Data Protection with Liquid and many more improvements are waiting for you in our upcoming post. Did we forget to mention that Orchard Core is now on the Area 51 site of Stack Exchange? Orchard Core updates Upgrade to ASP.NET 3.1.0 Orchard Core now using the v3.1.0 of the ASP.NET Core framework. This version is included in Visual Studio 16.4.0, so if you are using at least this version, you can build your own solution using Orchard Core. Here you can read a great article about the new features of this release. Validate Site Settings BaseUrl property You can set up the BaseUrl of your site under the Configuration -> Settings -> General on the dashboard. If you enter a URL, which is a not fully qualified URL, you will get a validation error. So, here you need to enter an absolute URL. Template Azure Blob and Data Protection blob configuration with Liquid You can customize the base path of the Blob Storage for media, for data protection and also for the container that you want to use. These can use a template in Liquid. If you have some custom rules to name your container or the base path, then you can define it this way. You can have access to the ShellSettings and the ContainerName properties. This will give you all the flexibility you need for instance to use the same container for all your tenants and then use a custom folder for each tenant. Or a custom container for every tenant and then the same path. You can also ask for the container to be created and it will be done when the tenant is started. You can read more about this feature in the documentation. Trumbowyg 2.21.0 and resizimg plugin Orchard Core using Trumbowyg, a lightweight WYSIWYG editor, that makes easier to edit your HTML content. Thanks to Antoine Griffard, Orchard Core now using version 2.2.10, including the resizimg plugin. For instance, when you set the Trumbowyg as the editor type of your HtmlBodyPart and insert a media with URL, you can just simply set the size of the image with a friendly user interface. Use GetLanguageDirection method everwhere When you check the content of the OrchardCore.Localization.Abstractions module, you will find a GetLanguageDirection extension method in the LanguageDirection static class. This method is used to get the language direction for a given culture. So, if we have an extension method like this, let's use it everywhere in the code. For example, check the code of the CultureDir extension method in the RazorHelperExtensions class, where you can see an example usage of the GetLanguageDirection method. Fix localization accessors names In ASP.NET Core we have many ways to use localization. The IStringLocalizer interface represents a service that provides localized strings and the IHtmlLocalizer interface provides localized HTML content. In Orchard Core, we used T, S, H, TS and TH, so it's time to unify these names and avoid the confusion. From now in the source code, the S will be used for the IStringLocalizer and the H will be used for IHtmlLocalizer. When localizing the views, the name T will be used like before. Scoped Liquid TemplateContext The goal was to improve perf on the Liquid rendering because we were creating a new TemplateContext and resolving all the services for each template. Here the idea is to create a shared Liquid TemplateContext only once per scope for perf, on which we do once a shared contextualization and then a specific contextualization before each rendering. Shared contextualization is done once per scope: add scoped services in ambient values, call Liquid handlers to add more ambient/scope values and access strategies, add all scoped Liquid filters. Specific contextualization before each rendering: e.g contextualize the localizer with the current view context, update the specific model value and its access strategy. And there are many places where we add a ContentItem value to the Liquid scope, we could remove them because now most of the time it is already accessible through Model.ContentItem. Here you can see that there is no need to create a new TemplateContext and add the ContentItem and the Model to it, it's enough to just simply pass the MarkdownBodyPartViewModel. News from the community Orchard Core on Stack Exchange Area 51 Area 51 is the Stack Exchange Network staging zone, where users come together to build new Q&A sites. New site ideas are proposed, discussed, and the best go on to beta. There is a request on Stack Exchange to create a custom community for Orchard Core. If you want to create a community you have to push for an idea and people need to approve and follow that idea. For this, it's needed more people to join and every person can vote for 5 questions and create 5 questions so, the community can continue on to the next stage. If you are interested in, check the FAQ of the Area 51 site and feel free to join the proposal! Orchard Nuggets: How to use Orchard Core without the sample themes? Try to reference the OrchardCore.Application.Cms.Core.Targets NuGet package instead of the OrchardCore.Application.Cms.Targets in your ASP.NET Core web application, that will only add the TheAdmin theme to your solution. In our third Orchard Nuggets post, we show you the differences between these two packages! Check out the other posts for more such bite-sized Orchard tips and let us know if you'd have another question! Orchard Dojo Newsletter Now we have 112 subscribers of the Lombiq's Orchard Dojo Newsletter! 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 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!

This week in Orchard - 09/20/2019

Now we are in the finish line of releasing the RC version of Orchard Core! Read our post for the most important things you should now about the new release and for a quick demo about the Cypress e2e testing suite for Orchard Core! On Orchard Core Some performance tweaks Marko Lahma, the author of Quartz.NET made a lot of performance tweaks to make Orchard Core much faster. Let's see some of those! In the RunningShellTable.cs use host.IndexOf(':') != -1 instead of host.Contains(':'). And a same performance tweak here: instead of extensions.Contains(Path.GetExtensions(content.Name)) use Array.IndexOf(extensions, Path.GetExtension(content.Name)) != 1). Also, do not use dynamic typing when it's not necessary. Instead of context.AmbientValues.TryGetValue("LiquidPage", out dynamic page)) use context.AmbientValues.TryGetValue("LiquidPage", out var page));. He also created a project called OrchardCore.Benchmarks, where you can run some microbenchmark. Migrate all Content Type / Part / Field Settings to Settings<T> There were some places in the recipe where settings were not under the Settings property. Check the blog recipe for an example. Here you can see that everything is in its namespace. You can find a Settings property and inside that, there is a ContentTypeSettings property. By organizing all the settings in their correct path we get a cleaner recipe file. Add default paging to GraphQL queries We have three different new properties: DefaultNumberOfResults: if you don't say first or last in your queries, we will limit the results to 100. MaxNumberOfResults: if you define first of last (give me the last 2000 content items) we will block you and limit to 1000. If you didn't provide a first or last, and if you have so many results, it will slow down your system considerably. You should always page your queries, otherwise, you could load everything on the memory of the server and if you have multiple clients you will get out of memory or the performance will be slow. MaxNumberOfResultsValiadtionMode: specify the validation behavior if the max number of results is exceeded in a pager parameter.* Default: in production info will be logged and only the max number of results will be returned. In development, a GraphQL validation error will be raised.* Enabled: a GraphQL validation error will be raised.* Disabled: info will be logged and only the max number of results will be returned. Migration to .NET Core 3.0 RC Now Orchard Core using .NET Core 3.0 RC, which means you need to install the new SDK (v3.0.100-rc1) to work with Orchard from here. Sebastien pinned the 1.0.0-beta3-72452 version on MyGet, so it won't be deleted, and it is the last one targeting .NET Core 2.2. Don't forget: to work with Orchard Core, you will need Visual Studio 2019! Orchard Core RC release The plan is to ship Orchard Core RC next Monday, maybe on Tuesday, after .NET 3.0 is released, so we can update the dependencies and build the things. It will be on NuGet.org as well. This release will be followed with the 1.0 (RTM) version. The number of the new package will have the following convention: OrchardCore 1.0.0-rc1-10000. The build number will be reset to 10000 and will be increased by one with every build of the dev branch. We need to update the documentation and the ASP.NET package references. There will be blog announcements: they could be in the Asp.net site right after the .NET Conf. Try Orchard Core will be updated to use the new version too. Demos Cypress e2e testing suite for Orchard Core Cypress is a next-generation front end testing tool built for the modern web. Cypress is most often compared to Selenium; however, Cypress is both fundamentally and architecturally different. Cypress is not constrained by the same restrictions as Selenium. This enables you to write faster, easier and more reliable tests. To use Cypress in Orchard Core first you have to run npm install in the test/cypress folder. Then followed by npm run test to build and host Orchard and run Cypress test on it. This will execute the content of the test.js file. First builds the solution, starts the application and starts the different Cypress tests. The test cases are in the integration folder, where now you can find three different cases: Setup SaaS Blog Agency Let's check the content of the Blog one. You can find a file called 01-setup-blog-tenant.js. Here you can find different test methods, like cy.login(), or cy.gotoTenantSetup(blog). These functions are defined in the commands.js file within the support folder. Let's check quickly what are these methods for! As you can see, using some predefined command, you can easily navigate to a given URL using visit. You can target the different HTML elements using get and submit a form easily as you can see in the screen above. The Cypress testing suite for Orchard Core is in its early stage, but you can find the current state and follow the development in this branch. On Lombiq Orchard Dojo Newsletter Now we have 90 subscribers of the Lombiq's Orchard Dojo Newsletter! 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 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!

This week in Orchard - 08/09/2019

Getting closer and closer to the release of .NET Core 3.0 and Orchard Core RC! What do we need to ship the new version and what are the newest features of Orchard Core? Find out now! On Orchard Core Updating YesSql In SQL server it was not working correctly if you pass the parameter as the limit value. You can do SELECT * FROM FOO @limit, where the @limit is the parameter. That will be converted to SELECT TOP @limit FROM FOO in SQL server, but that doesn't work. When you use a variable like this it needs parenthesis. Now every time when we render it in YesSQL, it's in parenthesis: SELECT TOP (@limit) FROM FOO.You can also find a xUnit test in the SqlParserTests.cs file, where the parameters of the InlineData attributes are also using parenthesis. Ability to extend/clear ContainedContentTypes Now if you want to update the ContainedContentTypes of the Container Part then you can do that. Before that, if you add a type it removes the old one. Now you can choose to merge it with the existing one. And by using the ClearContainedContentTypes extension method, you can also clear the ContainedContentTypes. Remove JSON specifier from GraphQL MD code blocks The documentation used the JSON highlighting for the GraphQL queries, which is the closest to a GraphQL query, but it's wrong. It could show some wrong colors, so now it's just doing nothing. A GraphQL query is not a JSON payload, just the result of the query. .NET Conf 2019 There will be the .NET Conf next month, which is a 3-day virtual developer event co-organized by the .NET community and Microsoft. Sébastien is submitting a talk about Orchard Core modularity and multitenancy. We hope that he will able to get a talk! On these days they launch .NET Core 3.0, which is the 23rd of September. A plan is to ship Orchard Core RC on the day after the .NET Core 3.0 and the builds are available. Upgrading an Orchard Core site that using .NET Core 2.2: it's non-breaking in terms of database or recipes and everything. We are just upgrading the APIs from 2.2 to 3.0. So, in theory, if we take a site that has been built with 2.2 and we just upgrade to the branch that using 3.0, then it should not change anything. The only thing it should change hopefully is the performance of the site because .NET Core 3.0 is much faster and use less memory than 2.2. The image of .NET 3.0 will also be available on Docker. To ship Orchard Core RC, we only need to have finalized all the things for localization. We have most everything we need, instead of the field syncing. Let's have a look at our Roadmap! You can see that everything is implemented from the backlog. Adding more localization packages will not be that hard, the repositories are already done for these packages. And we have PRs for almost every bonus features that listed in the roadmap. We also need to focus on every issue in GitHub that marked for RC and has a priority tag on it. A new website using Orchard Core Patient Access connects you to healthcare services when you need them most. Book GP appointments, order repeat prescriptions and explore your local pharmacy services. This site is running on Docker for Linux on Azure as an Azure Docker Service on Linux. It's based on GraphQL. For example, when you navigate to Pharmacy services and searching for healthcare services, then it's GraphQL. If you search for Hay fever treatments and using S66 as the postcode, the results that you got is returned by GraphQL. 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. On Lombiq Orchard Dojo Newsletter Now we have 88 subscribers of the Lombiq's Orchard Dojo Newsletter! 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 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!

This week in Orchard - 05/24/2019

In our post, we would like to show you some improvement of the content items list and the Markdown editor of Orchard Core. We also mention the Command Line support for Orchard Core. Check out our post for more! On Orchard 1.x Lombiq has an Orchard issue bug fixing hackathon and the goal was to fix as many issues for Orchard 1.x as we can. We made good progress and fixed several bugs. Let's see some of them! NumericField default value merge error fix The Default value of the NumericField was removed by accident after a merge. Now thanks to this PR, the textbox for specifying the Default value to NumericField was readded. Merge DraftFieldIndexService.cs into FieldIndexService.cs In Orchard 1.x, you could use the DraftFieldIndexService to save the draft and the FieldIndexService to save the published FieldIndexRecords. Because of these services do the quite same thing (the only difference is to save the Published or the Draft version of the record), it could be a good idea to remove DraftFieldIndexSerivice and keep only the FieldIndexService and have an enum to set which version you would like to save. You can find the implementation in this PR. Removing IProjectionManagerExtension There was an IProjectionManagerExtension interface to provide additional methods to the IProjectionManager. For example, you can get the content items by providing the ContentPart and a number to skip, which could be a great way to have pagination. Now the methods inside the IProjectionManagerExtension moved to the IProjectionManager and the IProjectionManagerExtension interface has been deleted. See the changes in this PR. Updating Newtonsoft.Json everywhere Orchard 1.x uses an outdated version of the Newtonsoft.Json library. We updated this package everywhere in Orchard to use the latest version. Fixing that stylesheets are not found on Dashboard Resource URLs are not replaced with file virtual path in StylesheetBindingStrategy leaving the URL pointing to TheAdmin theme folder instead of the related module path. Now when you visit the admin page of Orchard and open the Developer Tools in your browser, you will notice the missing 404 errors for the CSS files thanks to this PR. Fixing that Orchard.Workflows requires styles that don't exist We had a quite similar issue here as in the previous one, except there were also some empty CSS files that are included in the csproj files. You can see the fixes here. On Orchard Core Build error if a module with views doesn't use the Razor SDK If you create a module and you have views inside and you didn't correctly use the Microsoft.NET.Sdk.Razor SDK you will get a build error. In the project files, there is an SDK tag at the top and you can define which SDK the project should be built with. When you have Razor views, you need this SDK to be able to get precompiled views and embed them in the assemblies. Now if you have views and you didn't do that, the build will automatically fail to prevent failing in runtime because it could not find specific assets or views. Or maybe you started to implement your module with a standard class library, which didn't have views, then you add a view and don't understand why it doesn't work anymore. Consider Command Line support for Orchard Core There was some Command Line support in Orchard Core, but it was removed because of performance concerns. The code that is currently in for Command Line support for Orchard Core is using the same concept as Orchard 1, where modules can provide custom commands with the Command Line extensibility. The idea would be to have a CLI that is not in process of the Orchard host, but out of a process like a very separate .NET CLI, that will talk using HTTP with the host and the tenants. Therefore we could even use a CLI to remote control some tenants or instances. We don't have to run the CLI on the machine that runs Orchard. Being able to run remotely the CLI would be nice, and to automatically discover the commands from the API. You can find more details about the Command Line support for Orchard Core in this issue. Admin CSS: wrong BS4 version If you create a new pull request and don't update to the dev branch, then you will also submit an old version of Bootstrap and assets and people will have to fix it again. The only way to prevent that is by having a CI task that will ensure that the version is committed and rebuilding the assets doesn't change anything. We can't automate it, but we can fail the build to detect it. That would be an improvement because at least we could show the issue before we commit the issue. Orchard Harvest Based on the progress on Orchard Core, we could totally have something in September or October, like we did last time in a warm location. It would be about Orchard Core of course and a little bit about Orchard 1.11. That would be also a very good way to work on a free public online workshop during the Harvest. Orchard Core will be new for most of the people and they could learn the basics of Orchard Core here. Demos Filter content items on content items list page If you navigate to the admin page of Orchard Core and head to the Content Items page, you can search content items by title. You can also filter them by content types and by version. There was an error when you filter content items and hit the back button in your browser. In this case, you got a Confirm Form Resubmission, now it's fixed by using a GET request. Bulk actions in content items list You can also realize a Select All option here to select all the content items in the page. When using the Bulk Actions button, you can publish, unpublish and delete all the selected content items without needing to do these actions one by one. Markdown editor CSS and toolbar improvements This week the community fixed a bunch of styling issues with the SimpleMDE markdown editor. It used to look like with a dark border around the top and some horrible hovers and now it looks like this. It also couldn't go full screen because the z-index was below the Orchard navbar but it now goes fullscreen. Of course, the side by side preview mode works. It does also work on mobile as well. On Lombiq Orchard Dojo Newsletter Now we have 63 subscribers of the Lombiq's Orchard Dojo Newsletter! 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 every time when a new post 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!

This week in Orchard - 04/05/2019

Orchard Core Beta 3 is here! Read our post about the latest improvements of the new release and a way about how we could store static media files in the future using Orchard Core! On Orchard Core Orchard Core Beta 3 release We are proudly announcing that the community shipped Orchard Core Beta 3 release! Head to the GitHub page of Orchard Core to download the assets of the new release, where you can also find the list of changes for this release! Fixing DataAnnotations localization Using the PO file string localizer, users can't localize data annotations. When you have a model with some Required or DisplayName attributes, the value of the Error Message will be translated automatically using the StringLocalizer. In Orchard 1.x it never worked, but in Orchard Core, it supposed to work because it's using the correct service for translating which Orchard implements. The IStringLocalizer is created by a StringLocalizerFactory. The question is should a StringLocalizer know about the culture supposed to render or is it when we call _localizer.GetString that we should check what is the current culture? Our assumption was that the localizer should be localize for a specific culture because it had a method called WithCulture to return a new one for another culture. But actually, it's not working in this way. In our case is that we were creating a localizer for the current culture (like English, because it's our default), then we go on a page for Spanish, and it will still reuse the same localizer. Now we do the culture resolution when the GetString is called on the instance. It worked in the case of views, because the views get a new StringLocalizer instance every time they rendered, but not when the attributes are evaluated. It's important because this package is not just for the Orchard Core Framework or the CMS, it's a NuGet package, that anyone can use to localize their ASP.NET applications based on PO files. We support pluralization and dynamic PO files too. How to create Media content items in Orchard Core? In Orchard Core media are not content items, they are just files with a path. The Media Field is just a list of path to a file that is handled by the media storage. Most of the time we don't need a content item for the media. It's faster to store just the path and then to load the content item to store the data and render an image. But we can have Media content items by just create a content type (call it Image, Video or whatever) and attach a Media Field to that. Then you can have content pickers on your other content items to select this kind of media. Localization files guide Last week we wrote about that the new localization guide has been added to Orchard Core documentation. And we have good progress on some translations! As you can see, the Arabic is over 40%, the Chinese more than 80% ready! And we have just added the Orchard Core project to Crowdin! The documentation just has the dev version Now when you visit the ReadTheDocs page of Orchard Core, you will not see the option to read the latest or the dev version of the documentation, only the dev version is available. There can't be any misunderstanding about which branch you are targeting, we always show the latest branch (dev branch), and if we have documentation that only relates to the dev branch, we should make some notes in the documentation to say this won't work with the master. Improve the create button on List Part When you have only one content type attached to a List Part, then instead of having a drop down to select it, there is a button to create the given content type. Storing static Media By using the IFileStore, you can get files, store documents into a file store, etc. The IMediaFileStore implements IFileStore and provides two additional methods: MapPathToPublicUrlKnowing a path for media (like /images/thumbnail.png), this method will return the public URL that we need to render when we render a media. This file store can serve the correct media when it's requested. It's a bridge between an HTTP request to the file that is contained by the store. The default one is using the file system implementation (the folder), so it's just saying whenever you want to access /images/thumbnail.png, it will return /media/images/thumbnail.png. MapPublicUrlToPathThis is the opposite. When we have a public URL, can you guess which image it will present? This is done for a very specific reason. If we have an Azure Blob Storage, we want to render not the local path to the image, but the path to Azure Blob Storage. When we have an image to the media manager, it will store the image for example on Azure Blob Storage and then when we get the path for this media from a content item we need to find what is the public URL of this media in Azure. So the custom implementation for Azure Blob Storage will return http://mystorageaccount.blob.core.windows.net/mycontainer/myblob. The next step would be to remove the whole IMediaFileStore interface. Therefore we don't have to care about where publicly the media is accessible.What about serving the Blob Storage from our web server? When we go in /media/myimage.png, the path will be: "myimage.png". In case of an Azure Blob Storage, the public URL will be http://mystorageaccount.blob.core.windows.net/mycontainer/myimage.png. This is the URL, where the browser finds the image. When /media/myimage.png is requested, Orchard will download the blob (corresponding to that from Azure, and either render it directly on the request or save it as a cache locally) and serve it for the next request without having to ask for Azure. In terms of perf, it won't be slow and it opens other possibilities: 1. Resizing images If we do a resize, we could use the following URL: http://mystorageaccount.blob.core.windows.net/mycontainer/myimage.png?width=123 But this won't work, because if we do something like this, the server of Azure doesn't know about ImageSharp or whatever. This thing can only be done if we server the image by ourself. To be able to resize images, we need to process them, that means we need to load them and serve them not from a public URL. 2. CDNs Content Delivery Networks are local caches of the files we request. Some people use Azure Blob Storage because they want CDNs. But we can use CDNs even for our local images. The idea is to use CDNs even for Blob Storage. We could say that yes, we have Blob Storage, but just for storage, it's not for serving the images. We could also make it completely private, so nobody can access our Azure Blob Storage. It's the Orchard web server that will download the media, serve it in a way (/media/images/thumbnail.png) and if we have a CDN, then the CDN itself is responsible for asking us for the media (which will download from Blog Storage, so it will be slower for the first time), but then every time the users will hit the CDN, then they will get the image from the CDN, not from us. We won't even serve the image. Instead of having an interface, that gives us a public URL, every time we render a media is to have a configuration setting with the public CDN prefix for media files. In this configuration, we would define //myownsite.azurecdn.com. What you would do is configure Azure CDN to be a CDN on your website which is mywebsite.com. And whenever we render a media file, we would prefix the URL with that. The browser will ask the CDN for the resource, which will itself ask our site for the resource and then get the blob storage thing. We serve it, that means it will be resizeable, even with a CDN. If we make a request like //myownsite.azurecdn.com/foo.png?width=123, it will request that on our server, so we can resize everything. That would work with any CDN, like Azure CDN, Akamai, Horizon, CloudFlare, etc. Another option is to add a configuration setting with public CDN for resources. When we define a resource, we can set the debug version and the minified version, and also the CDN version. And we also have a setting to say I want to use a CDN version of my resources instead of the local ones (if they are available). We could also be able to set the CDN prefix for these files too, and then they would be also cached by a full CDN and the site would be much faster. However, we need to purge ImageSharp cache automatically with some thresholds. If we cache media items, need to have a way to purge. That's doable because every time we store a media we can store how much data we already stored like in a file that is also on the file system. There are many ways to do that. There is a website using the Blog recipe under sebastienrosdotcom.azurewebsites.net. It's hosted on the east coast, if we look at the Network tab using Google Chrome Developer Tools, it takes about 150 ms to render the page in Hungary, plus the static files, which are either in CDN or loaded by Orchard Core. Seb enabled the CDN and mapped this website to cdn.sebastienros.com. In the first time, it will be slower, but after if you hit F5, it takes less ms. On Lombiq Orchard Dojo Newsletter Now we have 56 subscribers of the Lombiq's Orchard Dojo Newsletter! 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 every time when a new post 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!

Performance-tuning modules you should know about

These modules are really useful if you want to squeeze out the performance of your Orchard website: Mini Profiler for profiling Orchard.Caching for a wide variety of caching solutions Cache for output caching (included in Orchard as of Orchard 1.7) Combinator for bundling and minifying static resources (stylesheets, scripts)