I asked this question in the Umbraco forum three days ago and haven't had a single answer. I have a website whose content I can no longer edit and I know the people at SO are the best, so here goes:
I just upgraded a site from Umbraco version 4.6.1 to 6.0.0 and now the only thing that displays in the content tab in the backend is a "Content" node. The whole tree has disappeared but the site actually still works it's just that I can't reach any of the content in the backend--Media, Settings, Developer, etc. tabs all appear to be working as normal.
If I right-click on the only visble node, "Content", I get "Create", "Sort", "Republish Entire Site" and "Reload nodes".
Create gives me the expected create dialog box but I don't want to try creating anything yet until I know what's wrong.
Sort throws the following error:
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.cms.businesslogic.CMSNode..ctor(IUmbracoEntity entity) +32
umbraco.cms.businesslogic.Content..ctor(IContentBase contentBase) +18
umbraco.cms.businesslogic.web.Document.<GetRootDocuments>b__1(IContent c) +38
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +151
System.Linq.Buffer`1..ctor(IEnumerable`1 source) +325
System.Linq.Enumerable.ToArray(IEnumerable`1 source) +78
umbraco.cms.businesslogic.web.Document.GetRootDocuments() +123
umbraco.cms.presentation.sort.OnPreRender(EventArgs e) +813
System.Web.UI.Control.PreRenderRecursiveInternal() +103
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Republish works without error re-creating the umbraco.config file in the App_Data folder.
Reload nodes appears to be trying to, well, reload the nodes, but nothing shows up in the end.
I'm using a MySql database and I'm happy to hack at it with a few sql commands to get things working again as I suspect that a few errant node ids are probably to blame but I don't know what tables to look at.
All help gratefully received.
PS: Umbraco "About" shows the following version information -- "Umbraco v6.0.0 (Assembly version: 1.0.4779.24222)"
I'd suggest that rather than troubleshooting the issue at this point, which is more like chasing a rabbit down a hole, that you take a copy of your backups and attempt the upgrade again. It's possible that you could have missed a step in the upgrade process. Pay special attention to the upgrade notes and the version specific upgrade notes (pretty much every version specific note can apply to you).
If you find that you still have problems after the second attempt, I'd suggest a more granular upgrade path, such as upgrading to highest version of 4.7, then to the highest 4.11, and then finally the highest of 6.0, again paying attention to the upgrade notes and checking after each upgrade that the site still works.
In either case make sure that you are running the installer at the end as this will allow umbraco to make some necessary changes to your database.
Related
I'm working on an Umbraco cloud project. I pulled the website from the git repositories and built it. First thing to do there when you run the site is to restore the content that's in the development environment to the local project so we can create new features. Yet Umbraco fails to do so with the following error:
The source environment has thrown a Umbraco.Deploy.Exceptions.ProcessArtifactException
with message: Process pass #3 failed for artifact
umb://document/xxthexguidxofxsomexpagexxxxxxxxx. It might have been
caused by an inner Umbraco.Deploy.Exceptions.EnvironmentException with
message: Could not get parent with id xxthexxx-guid-xofx-xthe-xxhomepagexx.
The following artifacts might be involved:
umb://document/xxthexxxguidxofxxthexxhomepagexx
The technical details may contain more information.
I've noticed that I some strange errors occur if not everything is deployed in the development site in the cloud. So I made sure everything is published.. Still errors though... I'm kinda lost here.
Has anyone come across simular issues? And how did you fix it?
Thanks in advance?
This can happen for a number of reasons, so it's a bit hard to say what exactly the problem is in your case.
Most of the time this happens due to either a circular reference of some sort causing a state that can't really be restored. For example that could be a datatype having a dependency on a node - but the node doesn't exist in a blank new environment. The content restore then refuses to start until the structural data (datatypes, contenttypes and such) is completely in sync, but the datatypes will never be able to be in sync until the content node exists. It's a sort of catch22 situation that might need to be resolved manually.
I would suggest you contact support through the Cloud portal and they will assist you in getting your problem resolved.
I need to upgrade one of our websites from Umbraco 6.0.7 to 7.4.0. I've updated the NuGet package and followed upgrade guides. I've replaced umbraco, umbraco_client and config folders to make sure there is no configuration incompatible with 7.4.0.
Unfortunately, the update wizard fails with this error message:
2016-02-16 20:57:13,838 [P6904/D3/T10] ERROR Umbraco.Core.DatabaseContext - Database configuration failed
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'System.Dynamic.ExpandoObject' does not contain a definition for 'NodeId'
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven.UpdateRelatedLinksData.<UpdateRelatedLinksDataDo>b__15(Object x)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Enumerable.<DistinctIterator>d__63`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven.UpdateRelatedLinksData.UpdateRelatedLinksDataDo(Database database)
at Umbraco.Core.Persistence.Migrations.Syntax.Execute.Expressions.ExecuteCodeStatementExpression.Process(Database database)
at Umbraco.Core.Persistence.Migrations.MigrationRunner.ExecuteMigrations(IMigrationContext context, Database database)
at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, DatabaseProviders databaseProvider, Boolean isUpgrade)
at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, Boolean isUpgrade)
at Umbraco.Core.DatabaseContext.UpgradeSchemaAndData(IMigrationEntryService migrationEntryService)
It seems that UpdateRelatedLinksData upgrade step expects different data / schema. How to fix this? Are there any manual changes to database required?
I have this exact same problem. I haven't found the answer yet but am exploring options on this thread over on our, umbraco's site.
I have managed to get the database upgraded to 7.3.7 by pointing a vanilla installation of Umbraco 7.3.7 at my 6.0.5 database, but when I try point the 6.0.5 site at the database I got this error which I could not resolve:
[InvalidCompositionException: ContentType with alias 'HeaderAndFooter' was added as a Composition to ContentType with alias 'AToZResults', but there was a conflict on the following PropertyTypes: 'umbracoNaviHide'. PropertyTypes must have a unique alias across all Compositions in order to compose a valid ContentType Composition.]
So I attempted to upgrade to 7.4 and got your error. I have found this ExpandoObject error on Umbraco's issues site and also a similar discussion on this issue and I followed the suggestion of exporting the database to an empty 6.1.6 instance. I can't get the data imported into the empty 6.1.6 database though, there are too many PK and FK constraint issues. Some people do suggest manual database edits, but mine's a large production site so I'm not going there.
So I am currently trying two ways:
1) Upgrading sequentially
2) The suggestion on the Umbraco thread, which is 'so if you have an updated vanilla umbraco solution pointing at an upgraded 7.3.7 database, can you just copy across the views, css scripts, js, images, config, fonts, media into the new solution... will it fly ?'
If anything works, I'll keep you posted!
I cannot seem to get anything out of SQLite other than "Unable to open the database file" on IIS. I'm convinced SQLite's error messages are as brusque as Oracle's.
Pre-deployment in Visual Studio 2010/IIS Express I can both read and write to the file.
When I tried to read/write it with the same VS2010 project deployed to IIS7.5, all "create", "read" and "write" commands fail.
The same occurs when I deploy the database file through the project and try to read it.
I've given Full control access to App_Data and the database file to the following users: IIS_IUSRS, IUSRS, DefaultAppPool, and Everyone.
I've looked at:
SQLite problem "unable to open the database file" (The problem automatically went away for the user) and a number of other similar questions, most of which were solved by changing permissions, changing to a writable directory (App_Data should be writable, no?) or changing a relative path to an absolute one (which |DataDirectory| should resolve to).
<connectionStrings>
<add name="sqlite" connectionString="Data Source=|DataDirectory|\datatables.sqlite;Version=3;" />
</connectionStrings>
Have I missed anything?
<Error>
<Message>An error has occurred.</Message>
<ExceptionMessage>Unable to open the database file</ExceptionMessage>
<ExceptionType>System.Data.SQLite.SQLiteException</ExceptionType>
<StackTrace>
at System.Data.SQLite.SQLite3.Open(String strFilename, SQLiteConnectionFlags connectionFlags, SQLiteOpenFlagsEnum openFlags, Int32 maxPoolSize, Boolean usePool) at System.Data.SQLite.SQLiteConnection.Open() at AjaxSource.Models.Database.query(String sql, Dictionary`2 parameters) in D:\Tools\Dropbox\Projects\myprojects\AjaxSource\AjaxSource\Models\Database.cs:line 48 at AjaxSource.Models.aaDataModel..ctor() in D:\Tools\Dropbox\Projects\myprojects\AjaxSource\AjaxSource\Models\aaDataModel.cs:line 18 at AjaxSource.Controllers.API.TableDataController.Get() in D:\Tools\Dropbox\Projects\myprojects\AjaxSource\AjaxSource\Controllers\API\TableDataController.cs:line 15 at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)
</StackTrace>
</Error>
I had a problem opening Sqlite database in IIS
(0x80004005): unable to open database file unable to open database
file
what helped me to solve the problem is changing the "Identity" of the application pool to "LocalSystem"
Application Pools -> DefaultAppPool (or another pool you are working with) -> Advanced Settings -> Identity -> LocalSystem
Hopefully it will save someone time...
We used to encounter this problem on the machines of our customers most often, and I have made a lot of investigation upon it and finally we've solved it.
First of all, you need to make sure that your application has read/write access to the database file as well as the folder containing the database file. In most situations, the check will fix the issue; but we are not among those fortunate ones.
In our case, where the application makes very highly concurrent access to the database, it's most probably related to the journal mode of the database, which usually is DELETE by default. That is to say, the rollback journal will be deleted once the corresponding transaction is committed or rolled back. On **nix systems, it's no error; but on Windows systems, it's another story, as can be seen below. On Windows systems, the problem could take place in the following scenario:
A journal file (say A) is created by a SQLite thread.
Another thread P tries to open A.
SQLite has finished its transaction and so deletes the journal file A.
But now thread P has handle for A, so SQLite enters the “Delete Pending” state.
SQLite starts another transaction and has to recreate the journal file (with the same name).
Windows reports ERROR_DELETE_PENDING error (see here for more information: http://blogs.msdn.com/b/oldnewthing/archive/2007/11/09/6001644.aspx)
SQLite report SQLITE_CANTOPEN error (that is, "Unable to open the database file").
P finally releases the file handle and A is deleted.
One solution is to use PERSIST or TRUNCATE journal mode instead of DELETE. See here for more details: http://www.sqlite.org/pragma.html#pragma_journal_mode
In this way, the rollback journal (.-journal) is not deleted at all, and thus we can get rid of the problem you said. I hope this helps.
Well I don't know if this will answer your question, but in my case I had a dummy error which is that I gave a wrong relatif URL to the database file when I copied my code from a commandline projet to the mvc one. Hope someone will find this useful.
It wasn't a permissions problem. The problem is that I didn't check that |DataDirectory| actually resolved to the AppData directory like it's supposed to.
On the IIS 7.5 server, |DataDirectory| resolves to C:\inetpub\wwwroot\AjaxSource\App_Data, but the actual AppData is directory is C:\inetpub\wwwroot\AjaxSource\bin\App_Data.
The errors I caught using Fiddler never mention any paths, but imply a permissions problem. I had one of my views display the resolved directory with:
<h1>#AppDomain.CurrentDomain.GetData("DataDirectory")</h1>
(Oddly, this isn't documented).
I am using Umbraco 4.8 and IIS 7. My code works fine when running from WebMatrix. Yesterday I moved it over to my local IIS server to test it before moving it to a remote server. I am unable to get a simple request for a media file to work. I cannot follow advice on other threads to use the Examine dashboard, as that is not compatible with 4.8. I have emptied out my media folder (in the back office and then in the folder itself) and used the desktop media uploader to put the images all back. No difference. My simple Razor file:
<img src="#Model.MediaById(Model.friendlyPicture).umbracoFile" alt="picture" />
causes the following crash:
Error Loading Razor Script (file: Tg Profile Image) The type initializer for 'Examine.ExamineManager' threw an exception. at Examine.ExamineManager.get_Instance()
at umbraco.MacroEngines.ExamineBackedMedia.GetUmbracoMedia(Int32 id)
at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(Int32 Id)
at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(String Id)
at umbraco.MacroEngines.DynamicNode.MediaById(String Id)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at ASP._Page_macroScripts_tgProfileImage_cshtml.Execute() in c:\Websites\UmbracoSites\Todd Growns\ToddUmbracoSite\macroScripts\tgProfileImage.cshtml:line 2
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
at System.Web.WebPages.WebPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
In previous projects, I just used the Upload function to add images to pages. It seemed much better to use the MediaPicker this time, to avoid uploading images twice. I have tried to get the image to load in various ways (including inline razor macro plus the ImageGen.ashx I would like to use) but it always falls down in the same place. I do not have an Examine index in my app_data folder, so I do not see how it can be to do with a corrupt index.
There are similar bug reports in various places but none with any kind of answer I can use.
I could look like Examine is having problems reading the ExamineIndex.config or ExamineSettings.config files.
When trying to get the media, it will first try to get it from Examine, before going to the database. In this case, it seems like it is not able to find an index, which might be because of a permissions issue, or a faulty config. Since it is working in webmatrix, I would assume that the configs are fine.
Have you tried giving the account of your app pool full permissions on your folder?
In the past when moving sites i have after move rebuilt the indexes. In this instance its the internalindex that stores media as well as document data.
Regards
Ismail
I have a windows service that is failing to start, giving an error "Error 1053: The service did not respond to the start or control request in a timely fashion".
Running the service in my debugger works fine, and if I double click on the the service .exe on the remote machine a console window pops up and continues to run without problem - I can even see log messages showing me that the program is processing everything the way it should be.
The service had been running fine previously, though this is my first time, personally, trying to deploy it with the most recent changes made to the program. I've evaluated those changes and cant figure out how they might cause this problem, particuarly since everything runs fine when not started as a service.
The StartRoutine() method of the service impelmentation is empty, so should be returning in a "timely fashion".
I've checked the event logs on the computer, and it doesn't give any additional information other than it didn't hear back from the service in the 30 second requisite time frame.
Since it works on my machine, and as a double-clicked executable, how would I go about figuring out why it fails as a service?
Oh, and it's .NET 2.0, so it shouldn't be affected by the 1.1 framework bug that exhibited this symptom (http://support.microsoft.com/kb/839174)
The box is a windows server 2003 R2 machine running SP2.
This is a misleading error. It's probably an unhandled exception.
Empty your OnStart() handler then try this in your constructor...
public MainService()
{
InitializeComponent();
try
{
// All your initialization code goes here.
// For instance, my exception was caused by the lack of registry permissions
;
}
catch (Exception ex)
{
EventLog.WriteEntry("Application", ex.ToString(), EventLogEntryType.Error);
}
}
Now check the EventLog on your system for your Application Error.
Could be a number of things and it might help to get a stack trace on the machine exhibiting the problem. There are a number of ways to do this but the point is that you have to see where this is failing in the code.
You can do this with remote debugging, but a simple thing might be to just log to the event logger, or file log if you have that. Literally, putting "WriteLine("At class::function()") throughout portions of the code to see if you've made it there.
This will at least get you looking in the right direction (which ultimately is the code).
Update:
See Microsoft's How to Debug Windows Services article for details in troubleshooting startup problems using WinDbg.
This related question details nice ways to debug services that are written in .NET.
I agree with Scott, the easiest way to find out what's happening is to put some traces in the start-up code (maybe it doesn't even come to your start-up code).
If this doesn't help, you can post your code here so others can take a look.
perhaps lacking some dependence, try this :
- deregister your service
- register again
If fail at register means that lack an module.
If the StartRoutine is empty, you are probably starting it somewhere else.
IIRC you need to fire off a worker thread, and then return from StartRoutine.
One of the problems which may lead to this error is if windows service which needs to be deployed consists of some error i.e it may be simple authorization error or anything as in my case I have referenced some folders and files for logging which were not existing, but when provided the right path of those file and folders it solved my problem.
I ran through every post on this particular subject and none of the responses solved the problem, so I'm adding this response in case this helps someone else. Admittedly this only applies to a new service, not this specific case.
I was writing a File listening service. As a console app, it worked perfectly. When I ran it as a service, I got the same error as above. What I didn't know (and many of the MSDN articles about services conveniently leave out) is that you need to have your class executed from within ServiceBase.Run( YourClassName());. Otherwise, your app executes and immediately terminates and because it terminated, you get the error above even if no error or exception occurred. Here is a link to an article about this. It actually discusses setting up your app for dual use - Console app and service: Create a combo command line / Windows service app
I had that issue and the source of my problem was config file. I edited it in notepad and notepad added one special character which cause service not to run properly because config file was ruined. I saw that special character in notepadd++ and after delete it, service started to run successfully as previous did.
In my case, the correct .NET framework was not installed on the server that I was installing the Windows service on.
One other reason is If you copy the DLL in 'debug' mode to installation folder this issue will come.What you need to do is Run the project in 'Release' mode copy the DLL or directly form Release folder rather than Debug folder,,and copy that DLL in to installation folder,it will work.You can see the reduction in size of DLL ,it will not contain any debug symbols and like that