c# - Orchard CMS failing to discover resources defined in a theme after Publish from Visual Studio -


so, tried publish (both web deploy , file system) orchard instance. have quite few custom modules , custom theme. have resourcemanifest : iresourcemanifestprovider in theme's project. yes theme has own project , included in solution. scripts , styles defined working beautifully when debug , work on dev environment. far good.

today tried setup test environment of current version. tried essential without copy/pasting whole folder structure. naturally tried publish orchard.web project. , after short struggle right permissions applied...it worked , access site. unfortunately when navigated 1 of custom pages has style.require("resource defined in theme") crashed error message resource name "bla bla" cannot found.

i tried publish both debug , release configuration didn't help. tried move styles theme project more concrete custommodule didn't discover it.

could caching? should restart iis or website in iis? somehow these new definitions cannot detected.

in end tried use style.include , seemed won't crash, see when navigate page receive "the page not exist message" in content area (at least didn't crash)...

i totally lost issue. appreciated. can give more detailed info let me know what.

i running orchard v.1.8.1.0.

this code:

manifest.definescript("bootstrap").seturl("http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js");         manifest.definestyle("bootstrap").seturl("http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"); 

error message:

system.reflection.targetinvocationexception: exception has been thrown target of invocation. ---> system.reflection.targetinvocationexception: exception has been thrown target of invocation. ---> system.invalidoperationexception: 'stylesheet' named 'bootstrap' not found. @ orchard.ui.resources.resourcemanager.buildrequiredresources(string resourcetype) in 

edit 03.01.2017

i have abandoned efforts quite while. today decided start battling again , found following:

  1. i moved resource definitions mythemeproject/resourcemanifest.cs nonthemecustommodule/resourcemanifest.cs file (one wrote).
  2. i rebuild , re-published using web deploy , working!!!!

which pretty cool , solves issue, quite unexpected, since have same definitions twice , orchard doesn't complain it. leads me believe resourcemanifest file in theme not taken account reason. if orchard team can tell me doing wrong, or if bug of orchard, great.

cheers!

i've encouter situation couple of time different scenario tho. in orchard application pool may need have rights on folder ur ressources stored. add ur security folder, may problem.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -