Many issues with 1.1 upgrade ***

Topics: Installing Orchard, Troubleshooting
Apr 14, 2011 at 11:14 AM

I wiped my site files and replaced them with the 1.1 files.

1. The docs seem to indicate that I need to use orchard.exe to enable the recipe feature, but it doesn't look like that's possible against a deployed site.  Being on GoDaddy I can't run it from the bin folder!  Is that step really necessary?

Also, I'm having odd problems with the files in the App_Data\Dependencies folder becoming locked causing fatal issues.  If I rename it to _Dependencies then it recreates the folder and all is good for a bit, but then it happens again.  I have renamed the folder three times now.  Somehow they are being locked, and then Orchard is trying to write them out again.

2. I can't deploy any themes or modules because of (other?) issues I'm having.  When I go to the settings/Themes tab, I get:

Listing themes failed: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.

My site actually has no theme now (www.ariankulp.com).

3. When I try to add a module, I get:
[DependencyResolutionException: None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Packaging.Controllers.PackagingServicesController' can be invoked with the available services and parameters:
Constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Packaging.Services.IPackageManager, Orchard.Packaging.Services.IPackagingSourceManager, Orchard.UI.Notify.INotifier, Orchard.FileSystems.AppData.IAppDataFolderRoot, Orchard.IOrchardServices, Orchard.Modules.Services.IModuleService, Orchard.Recipes.Services.IRecipeHarvester, Orchard.Recipes.Services.IRecipeManager)' parameter resolution failed at parameter 'Orchard.Recipes.Services.IRecipeHarvester recipeHarvester'.]
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +309
   Autofac.Core.Resolving.ComponentActivation.Activate(IEnumerable`1 parameters) +48
   Autofac.Core.Resolving.ComponentActivation.Execute(IEnumerable`1 parameters) +97
   Autofac.Core.Resolving.ResolveOperation.Resolve(ISharingLifetimeScope activationScope, IComponentRegistration registration, IEnumerable`1 parameters) +181
   Autofac.Core.Lifetime.LifetimeScope.Resolve(IComponentRegistration registration, IEnumerable`1 parameters) +91
   Autofac.ResolutionExtensions.TryResolve(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) +72
   Autofac.ResolutionExtensions.TryResolve(IComponentContext context, Service service, Object& instance) +44
   Orchard.Mvc.OrchardControllerFactory.TryResolve(WorkContext workContext, Object serviceKey, T& instance) in OrchardControllerFactory.cs:26
   Orchard.Mvc.OrchardControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) in OrchardControllerFactory.cs:71
   System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +66
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +209
   System.Web.Mvc.<>c__DisplayClass6.b__2() +50
   System.Web.Mvc.<>c__DisplayClassb`1.b__a() +13

 
It's the same account and same database.  New folders, but the exact same permissions applied (I've verified several times!).  I just have no idea what to do and I'm getting very frustrated.
Apr 14, 2011 at 3:21 PM
Edited Apr 14, 2011 at 3:56 PM

I just want to add that I've also been getting this error one some themes and I see no reason for it to work with a few and not with others.

I think my issue is similar to yours, and there's no need to open a new discussion.

In my case, all themes worked fine in the 1.0.20 version and stopped working from then on. I've been using clean installs of the v1.1.

And it does not only throw the exception, but also wrecks my "themes" area, which I can only bring back by erasing the theme from the physical themes folder.

Output after adding the nuget theme:

Successfully added 'Orchard.Theme.Dark 1.0.0' to C:\inetpub\wwwroot\Orchard_v11_5923\
The theme has been successfully installed. It can be enabled in the "Themes" page accessible from the menu.
Listing themes failed: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.
Developer
Apr 14, 2011 at 7:24 PM
Edited Apr 14, 2011 at 7:28 PM

Indeed there is an issue that has been reported when upgrading that the recipes module (a new module in 1.1) needs to be enabled prior to using some features. You can enable it, for instance, through the command line by running:

"feature enable Orchard.Recipes"

If accessing the console is not possible, assuming your site is already setup, you could try to enable the feature throught the normal process under "modules". That might work.

 

Andre

Coordinator
Apr 14, 2011 at 7:26 PM

@atkulp: the documentation also says "It is highly recommended that you work on a local copy of your site throughout the update process."

Apr 14, 2011 at 7:38 PM

no luck runing the enable cmd for the themes, still getting exceptions.

I would guess that the recipes feature was enabled by default, after installing orchard

Coordinator
Apr 14, 2011 at 7:39 PM

Not after an upgrade: upgrade at the moment is a manual process, which means no code is running, which means that new modules are unknown in your old database, which means they are disabled.

Apr 14, 2011 at 7:44 PM

I understand.

I don't speak for atkulp. Although I'm having the exact same issue on the theme uploads, I'm using fresh 1.1.30 installs to add the themes.

I could be wrong, but I would guess both of us are experiencing the exact same thing, regardless of using upgraded or fresh installs. At least on the themes issue.

Coordinator
Apr 14, 2011 at 7:49 PM

Did anyone file a bug for that yet?

Apr 14, 2011 at 7:52 PM

I did find this issue on what seems to be something similar

http://orchard.codeplex.com/workitem/17423

but I didn't find, or filed anything myself

Apr 14, 2011 at 9:35 PM
bertrandleroy wrote:

@atkulp: the documentation also says "It is highly recommended that you work on a local copy of your site throughout the update process."


I know!  I didn't think it would be required.  Is there any other way to enable a module manually?

Coordinator
Apr 14, 2011 at 9:39 PM

Recipe is a core module, so the only way to enable it is through the command line. You might have some luck going directly into the database but that is going to be much much harder than just doing the upgradelocally and then deploy.

Apr 14, 2011 at 10:32 PM

So I copied things down and enabled them locally.  I've got everything working now, except that I still can't get Recipes enabled.  I still get:

List themes failed: Object reference not set to an instance of an object.

Object reference not set to an instance of an object.

Coordinator
Apr 14, 2011 at 10:53 PM

You get that when you do what?

Apr 14, 2011 at 10:57 PM

If I navigate to the Admin/Themes page.  Under that error it says no themes installed.

Coordinator
Apr 14, 2011 at 10:58 PM

Well, do you have themes installed? In particular, is the theme your site was using before migration there (as well as all its parents if it has any)?

Apr 14, 2011 at 10:58 PM
bertrandleroy wrote:

Recipe is a core module, so the only way to enable it is through the command line. You might have some luck going directly into the database but that is going to be much much harder than just doing the upgradelocally and then deploy.

I for one would appreciate knowing how to enable the module by updating the database.

As an aside, what happened here, was auto-enabling for core modules late to the station so that it missed the ship train?

Coordinator
Apr 14, 2011 at 11:01 PM

I would tell you if I knew how to do it.

What happened here is that the recipe module did not exist in 1.0. When you upgraded to 1.1 with a 1.0 database, that 1.0 database had no idea that it even existed. Thus it is in disabled state.

When you do a fresh install of 1.1, it is enabled during setup.

Apr 14, 2011 at 11:24 PM
Edited Apr 14, 2011 at 11:31 PM

gotta be honest, I have been pissing about with multiple vanilla installations and also shifting some existing databases over to the new version (all local) as I am new to Orchard and currently  in a discovery phase.

All I can say is that whilst I have had a couple of issues, I certainly haven't had any of the issues mentioned on this thread apart from recipes not enabled, which didn't take much to sort. The only real issue I have had is from the gallery downloaded 'Navigation' module (not advanced but but the previous version)
I had to remove the module AND every instance of the widget that were in placed in various places before I could get it stable (Orchard went mental when I just accessed the dashboard even when the feature were disabled)

Perhaps (if possible) you could gradually disable/remove modules that are not standard and see if the situation improves? 

HTH

Nick

Apr 15, 2011 at 2:46 PM
Edited Apr 15, 2011 at 2:47 PM

I'm still getting this when adding some themes to a fresh 1.1 version

Successfully added 'Orchard.Theme.Dark 1.0.0' to C:\inetpub\wwwroot\Orchard_v11_5923\
The theme has been successfully installed. It can be enabled in the "Themes" page accessible from the menu.
Listing themes failed: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.
Can anyone tell me what it can be done to mitigate the issue? Should I file this into the issue tracker?
Apr 15, 2011 at 3:18 PM

I know its probably not much help but for what its worth, I just unzipped a fresh version of Orchard locally, opened it up in VS 2010, hit F5, went straight to my dashboard, Installed Dark and enabled it  without a single problem.

Nick

Apr 15, 2011 at 3:22 PM
Edited Apr 15, 2011 at 3:25 PM

Yeah I can also install the Dark version from the Orchard gallery without any issues.

But the Dark theme I'm installing is a newer version i'm adding through the upload area, which worked fine in 1.0.20 and now it doesn't.

I'll try debugging with VS2010 and see what happens...

Apr 15, 2011 at 3:31 PM

I need to see where the null reference error is coming from to know what the problem might be.

Apr 15, 2011 at 3:44 PM

I get nothing in VS2010. it doesn't jump to any exceptions after the error :(

should I break point somewhere to get some values or whatever to help figuring this out?

 

what if I uploaded my nuget file here?

Apr 15, 2011 at 3:56 PM
Edited Apr 15, 2011 at 3:57 PM

I'm temporarly placing my Dark theme package, hoping someone would try to upload it and tell me if there is something wrong with the package itself or not.

http://tuning.bind.pt/orders/tiago/Dark.ORX1.zip

Thanks!

Apr 15, 2011 at 3:57 PM

Where you get the "object reference" error, can you post full details of the error including source lines etc.?

Apr 15, 2011 at 4:03 PM

I just go to themes, install from file, browser to the nuget file, select, click install and after a few seconds it ends saying those lines and nothing else.

It happens with some themes, but not all of them and I see no difference between those who actually work and those who don't

Apr 15, 2011 at 4:06 PM

Do the same themes install fine thru the gallery? Or are they all customised versions or non-gallery themes?

Apr 15, 2011 at 4:09 PM

As an example, I can install WePro themes from the upload area with no problems whatsoever.

Did you try adding the Dark theme from the link above to a v1.1?

Apr 15, 2011 at 5:26 PM

Sorry, I just got back in from picking the bin lid up from school. Give me five and I will have a look at it.

Apr 15, 2011 at 6:00 PM
Edited Apr 15, 2011 at 6:26 PM

Ok I just dropped your dark theme into my themes folder after renaming the original dark theme I had there and and got the error in the red message section in the top of the dashboard.

Listing themes failed: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.

 

I also got an option to upgrade the theme online in the update tab on the themes section of the dashboard, which I did and at the moment it seems to work ok.
I  want to check using the install from computer option, does anyone know which actual file is to used when browsing? is it just the .nupkg file or...?
Apr 15, 2011 at 6:50 PM

Sounds like there's just an error in the theme; what have you changed in it ftlcd?

nick - yes just upload the nupkg file.

Apr 15, 2011 at 6:53 PM

It's just another theme generated by the tuning tool.

WebPro based themes all work.

Dark based themes worked on the 1.0.20 and don't work on the 1.1.30

I need to know if there is something to fix so I can, well, fix it!

Apr 15, 2011 at 7:11 PM

Well ... it sounds like there IS something to fix, have you checked the Orchard logs for what the error actually is?

Apr 15, 2011 at 7:29 PM
Edited Apr 15, 2011 at 7:34 PM

Ok so I installed by browsing for the nupkg  file and got the following in the dashboard.

 

(In Green)
Successfully added 'Orchard.Theme.Dark 1.0.0' to C:\Users\Nick\Desktop\Orchard.1.1\TestDark\src\Orchard.Web\
The theme has been successfully installed. It can be enabled in the "Themes" page accessible from the menu.

(in red)
Listing themes failed: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.
Again I got an option within orchard to update the version of the theme which I did.
I then navigated to the homepage and got a   "The IControllerFactory 'Orchard.Mvc.OrchardControllerFactory' did not return a controller for the name 'Dark'" in MVC\Routes\ShellRoutes.cs within VS which I stepped to let the homepage load.
The homepage has loaded, the theme has changed and as far as I can tell at first glance its ok despite the errors.
EDIT: That is.... it is ok if its supposed to be the Black/Green version of the theme.
Apr 15, 2011 at 7:30 PM

 

as soon as I install a fresh version with the web platform installer, I get dozens of empty files like this

orchard-error-2011.04.15-07_22_59.260.log

 

when I click "Install a theme from your computer", browse to Dark.ORX1.nupkg and click "Install" I get:

Successfully added 'Orchard.Theme.Dark 1.0.0' to C:\inetpub\wwwroot\Orchard_v11_5923\
The theme has been successfully installed. It can be enabled in the "Themes" page accessible from the menu.
Listing themes failed: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.

 

two of the logs weren't empty:

 

2011-04-15 19:27:02,643 [7] Orchard.Themes.Controllers.AdminController - Listing themes failed: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Orchard.Themes.Controllers.AdminController.<>c__DisplayClass8.<Index>b__5(ExtensionDescriptor extensionDescriptor)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Orchard.Themes.Controllers.AdminController.Index()

2011-04-15 19:22:55,212 [6] NHibernate.AdoNet.AbstractBatcher - Could not execute query: SELECT this_.Id as Id12_0_, this_.SerialNumber as SerialNu2_12_0_ FROM Settings_ShellDescriptorRecord this_ WHERE 1=1
System.Data.SqlServerCe.SqlCeException (0x80004005): The specified table does not exist. [ Settings_ShellDescriptorRecord ]
   at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
   at System.Data.SqlServerCe.SqlCeCommand.CompileQueryPlan()
   at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
   at System.Data.SqlServerCe.SqlCeCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)
2011-04-15 19:22:55,262 [6] NHibernate.Util.ADOExceptionReporter - The specified table does not exist. [ Settings_ShellDescriptorRecord ]
2011-04-15 19:22:55,278 [6] NHibernate.Util.ADOExceptionReporter - The specified table does not exist. [ Settings_ShellDescriptorRecord ]

Apr 15, 2011 at 7:33 PM

after the exception all themes vanish from the admin area themes page and I need to physically erase Dark to get things back to normal

Developer
Apr 15, 2011 at 7:36 PM
Edited Apr 15, 2011 at 7:37 PM

Hi ftlcd,

 

I looked at the problem when installing your theme and it seems there is indeed a bug in orchard in regard to upgrade notifications. To work around that problem you should go to Themes\Dark\theme.txt and set the version to the current one on the gallery ("1.0.22") or higher.

 

Andre

Developer
Apr 15, 2011 at 7:38 PM

Alternatively you could also rename the theme to another name (rename the folder).

Apr 15, 2011 at 7:41 PM
Edited Apr 15, 2011 at 7:44 PM

You nailed it!

At least know we know what's happening.

Developer
Apr 15, 2011 at 7:45 PM

In terms of versioning I think what should happen is that the theme you are installing should have a higher version (or different naming) than the one that is on the gallery - since it is a variation of it. Wouldnt you agree ? In any case, we dont control what is on the gallery - this is purely a bug on orchard that unfortunately slip through.

Apr 15, 2011 at 8:32 PM

I do understand installing an older version isn't a very understandable thing to do, but it still should be possible.

Even because there's no actual newer version installed, just available. I'd understand if it didn't install when other (older or newer) versions are already installed.

When other versions exist it would be nice to have an "upgrade" box to allow replacement, regardless of both version builds.

Well, I'm just glad we found out what was causing this cause not knowing was killing me.

Developer
Apr 15, 2011 at 8:37 PM

Agreed. This should definetely work.

May 2, 2011 at 4:07 AM

This

Indeed there is an issue that has been reported when upgrading that the recipes module (a new module in 1.1) needs to be enabled prior to using some features. You can enable it, for instance, through the command line by running:

"feature enable Orchard.Recipes"

AND THIS

@atkulp: the documentation also says "It is highly recommended that you work on a local copy of your site throughout the update process."

is really a huge roadblock to using this on shared hosted sites where you are using a remote SQL Server.  Can someone post how to do the update to the database?

Coordinator
May 2, 2011 at 5:14 AM

You mean when you don't have tools to access the database? Myself, I would consider moving to a different hoster, as being able to hit the database, export it, etc., seems like an absolute must have from my hoster. Well, if you have no other choice, you can still enable the recipe feature through the web command line that is in the experimental module (install this *before* migrating). Other than that, you would follow the same process that you would locally.

FWIW, we are working on improving the upgrade process for the next versions.