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.
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.
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.
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.
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!