Orchard CMS Content Deployment with Orchard Deployment Module - orchardcms

I am evaluating Orchard 1.9.2 as I am looking for a CMS where I can have a staging area so that users can test and approve content on a staging site before committing changes to live.
I installed 1.9.2 both locally and on Azure, and also the Orchard Deployment module (Wng.Deployment). Setting up and pressing Test on the Sources and Targets tab works, but when I try to create a deployment I get the YSOD
Shape type DatePickerLocalization not found
Source file: d:\home\site\wwwroot\Modules\Wng.Deployment\Views\EditorTemplates\Parts\Deployment.Subscription.cshtml
[OrchardException: Shape type DatePickerLocalization not found]
If I enable the Shape Tracing module, the error message changes but it still doesn't work.
It appears that the Orchard Deployment Module isn't compatible with 1.9.2.
Any ideas on how I can achieve this?

Related

The recipe in Orchard core doesn't show up on admin configuration menus

I have setup Orchard core 1.2.2 but items under the admin side bar 'Configuration > Recepies' always shows "Nothing here! There are no recipes for the moment."Orchard recipe item
Then I try to add a test recipe with Recipes folder as the instructions of https://docs.orchardcore.net/en/latest/docs/reference/modules/Recipes/ still remain the same result. But the new recipe can show when I build a new sites.However, it still not showing under the admin configuration as before.
orchard recipe during setup
I try to use import JSON thru configuration menus but still nothing showing.
Please advise how I can solve the issues.
Thanks in advance.
I am by no means an expert however I have noticed today that it's better to create the OrchardCore CMS project by entering the commands as follows, which will yield a "more complete" installation/configuration initial page that includes the Recipe dropdown list along with the Default Time Zone dropdown, both of which are missing when adding the OrchardCore.Application.Cms.Targets Nuget to an empty ASP.NET .NET6 app. So the commands are (the --logger serilog is optional):
# mkdir MyCmsSite
# cd MyCmsSite
# dotnet new -i OrchardCore.ProjectTemplates
# dotnet new occms --logger serilog
As a result you will get a CMS site ready to be configured, just run "dotnet run".
You will also have the following project templates available in case you decide to create them later on:
Template Name Short Name Language Tags
------------------------ ----------- -------- --------------------
Orchard Core Cms Module ocmodulecms [C#] Web/Orchard Core/CMS
Orchard Core Cms Web App occms [C#] Web/Orchard Core/CMS
Orchard Core Mvc Module ocmodulemvc [C#] Web/Orchard Core/Mvc
Orchard Core Mvc Web App ocmvc [C#] Web/Orchard Core/Mvc
Orchard Core Theme octheme [C#] Web/Orchard Core/CMS
Source: Code Generation Templates
'Configuration > Recepies' only displays Recipes that are not setup recipes.
Also receipies tagged with hidden are also not visible in admin.

Orchard 1.10.1 on Azure installation

I set up a new AppService on Azure along with an empty database.
I downloaded and opened Orchard 1.10.1 in Visual Studio 2015. I right click the solution and rebuild. After that completes I right click Orchard.Web and publish. I downloaded the publish profile and loaded it into VS2015 during the publish process for the Orchard.Web.
The publish process completes successfully and opens a new browser window. After it compiles it only loads a white page with message:
Server Error in '/' Application. The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure
that it is spelled correctly.
Requested URL: /
If there are no orchard logs in site\wwwroot\App_Data\Logs, then you can check the event view logs to see if there is anything there which might be logged outside of the Orchard app:
https://blogs.msdn.microsoft.com/benjaminperkins/2016/07/01/how-to-view-the-event-logs-of-your-azure-app-service/
Otherwise, rather than VS publish, you could try a console build and FTP?
Execute: msbuild Orchard.proj /t:Precompiled /v:m /m
Then upload the \build\Precompiled folder to site\wwwroot
If this is a new site you should actually hit the setup page to paste in the connection string to initialize the empty database. Also this method should startup reasonably quickly as there will be no compilation done on the server.

Orchard CMS: Where new theme structure and files get saved when installed from Gallery

I have a couple of general questions please. Just stepping into Orchard CMS. So apology if they look stupid!
Today I installed a theme called Metro from Theme Gallery. It is visible on theme selection page as well. But where the files and folder structure are got saved in Orchard CMS? I looked into Theme folder but it is not there. I want to see how the structure is placed so that I can create one myself
One more thing. Theme .png file shows a nice layout but when I activate it the layout comes up completely different. Why is this?
And finally, I installed my site using Orchard's web interface and it is running fine. But when I tried to run orchard > codegen theme CreditLine, it said Command codegen doesn't exist.
I then run Setup utility from command prompt (orchard >) and it displayed
A previous Orchard installation was detected in this database with this table prefix.
Which clearly says the setup I did through web interface was successful. But still I am not able to run codegen command or even help codegen. The latter command shows Command codegen doesn't exist!
Orchard version: v.1.10.1.0
1) It should be installed under Themes/TheThemeName, or locally, under src/Orchard.Web/Themes/TheThemeName
2) It could be that you installed an old theme. Not sure because you don't give many details over what goes wrong.
3) You first have to enable the codegen module. Do this by starting up your Orchard, go to modules => Codegen => Enable. Or run in the orchard.exe: feature enable Orchard.CodeGeneration
After a lot of Googling and struggle I found a nice community here where I got my answer!
Orchard Repository on Github defaults to dev branch which I overlooked completely when cloned it for the first time! So I removed everything from my local and cloned the source again but from master branch this time.
No more compilation error or Command Line issue popped up. Orchard.CodeGeneration feature got enabled from CLI this time without a problem. Everything else seems to be working fine as well.
Steps:
1. Removed source from my local which I cloned from dev branch initialy
2. Cloned Orchard from master branch
3. Opened solution in VS2015
4. Compiled, run and setup my first site
5. And finally ran feature enable Orchard.CodeGeneration from orchard command prompt.

Orchard 1.8 Can't Enable Custom Module

I am in the process of upgrading from Orchard 1.7 to 1.8. Everything seems fine locally, but when I deploy my site, 1 of my custom modules is disabled. When I click the "Enable" link in the modules section of the dashboard, the page refreshes, but the module is still disabled. My local instance is connected to the same database and shows the module enabled so not really sure what is happening. I don't see any details in the standard error logs.
Is there any way to see any errors that could be causing a module to fail being enabled?
Thanks
This turned out to be due to a case mismatch in my feature name vs my module folder name. My module was originally named in Pascal case ie. 'MyModule'. Somewhere along the way my folder had gotten renamed to 'Mymodule' while the Module.txt file still listed the primary feature as 'MyModule'.
I finally hunted this down by copying the Orchard.Modules.pdb file into the bin folder of my precompiled web application and attached the VS debugger to it to see what was going on. The issue presented itself inside of Orchard.Modules.Controllers.AdminController.Features() where a comparison of FeatureDescriptor.Id == ShellFeature.Name failed to match on account of the case mismatch. The result was that my feature was being shown as disabled even though it is enabled in the database.
Not a direct answer to your question but did you do a complete rebuild before publishing your orchard site (assuming that is how you deployed it)? I have found that sometimes you have to do a rebuild all before publishing.

Custom workflow action deployment on multi server farm

I created a wsp solution that which create 2 custom workflow actions. I want to deploy it to my 2 servers farm which have an application server and a webfront end server. SPF Web application is not activated on the app server.
My visual studio solution goes like this:
-One project which create the dll, where actions code is.
-One project which create the wsp package, feature, etc. The package references the other project as additional assembly.
My problem is, when I deploy my wsp package with Deployment Server Type WebFrontEnd, the feature is only installed on the wfe and I can't activate it. I can't see the feature in the manage feature page (the feature is farm level). When I change the Deployment Server Type of the package to ApplicationServer, I get the following message:
"This solution must be deployed to application servers, not front-end Web servers. It cannot contain a resource that is scoped to a Web application."
I did some tests. I removed the additional assembly from my package and then I can deploy my wsp solution as ApplicationServer type (but can't use my custom actions..). Then I created a dummy dll with nothing in it, added it as additional assembly to my sharepoint package and I realised I can't deploy my wsp as ApplicationServer type again.
So, can I reference an additional assembly from my wsp solution and still deploy as ApplicationServer type??
How can I deal with this? Any idea?
I did it again, I've been looking for answers for this all day, I finally post something here and one hour later, I got myself the answer. Here it is anyway.
I deployed independently both solutions using 2 wsp packages. One simply deploys the dll into the gac (and is ApplicationServer), the other one is using it without deploying it itself (and is WebFronEndServer). Now I have to deal with making sure the first one is deployed before using the other one... Feature activation dependency should do it.
Regards.

Resources