it looks like the xml file for the template is invalid because their it is missing closing tags. (<pre><code>) this shouldn't matter as umbraco wraps the design section in <![CDATA[ ]]> anyway - but for some reason it's not doing that here... can you paste the def.config file for this template below ?
2013-06-06 17:37:32,103 [44] INFO umbraco.BusinessLogic.Log - [Thread 36] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Debug | User: 0 | NodeId: 0 | Comment: uSync: Saving to Disk - End
2013-06-06 17:37:32,104 [44] INFO umbraco.BusinessLogic.Log - [Thread 32] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Debug | User: 0 | NodeId: 0 | Comment: uSync: Reading from Disk - Starting
2013-06-06 17:37:35,144 [44] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 50] An unhandled exception occurred
System.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: Design, Template. Line 5, position 11.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ThrowUnclosedElements()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at jumps.umbraco.usync.SyncTemplate.ReadFromDisk(String path)
at jumps.umbraco.usync.SyncTemplate.ReadFromDisk(String path)
at jumps.umbraco.usync.SyncTemplate.ReadAllFromDisk()
at jumps.umbraco.usync.uSync.ReadAllFromDisk()
at jumps.umbraco.usync.uSync.RunSync()
at jumps.umbraco.usync.uSync.DoOnStart()
at jumps.umbraco.usync.uSync.OnApplicationStarted(UmbracoApplicationBase httpApplication, ApplicationContext applicationContext)
at Umbraco.Core.CoreBootManager.<Complete>b__4(IApplicationEventHandler x)
at Umbraco.Core.EnumerableExtensions.ForEach[TItem](IEnumerable`1 items, Action`1 action)
at Umbraco.Core.CoreBootManager.Complete(Action`1 afterComplete)
at Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete)
at Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e)
at Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e)
2013-06-06 17:37:45,210 [44] INFO umbraco.BusinessLogic.Log - [Thread 26] Log scrubbed. Removed all items older than 2013-04-07 17:37:45
2013-06-06 17:37:45,215 [44] INFO Umbraco.Core.UmbracoApplicationBase - [Thread 26] Application shutdown. Reason: InitializationError
2013-06-06 17:37:59,238 [35] INFO Umbraco.Core.PluginManager - [Thread 43] Determining hash of code files on disk
Silly question, but how do I set the #UMBRACO6 = true on compiler? I am trying to figure out exactly what the issue is. I have my own DLL but I suspect it is not hooking in properly as I get no error and no new files.
if you go to the properties section of your solution in visual studio, you can set UMBRACO6 in the condintional compilation symbols, you also need to ensure you are refrencing the umbraco 6 dlls in the solution.
but the version in GIT is setup for v6 and if you put the wrong version onto a v6 install you get a YSOD so if you don't get that then its something else might be stopping your version working.
Are some of these references from different version of Umbraco? Or can I just reference all from 6.1.1? One website we got it running, the other is throwing an odd error and we would really like to trace and report what the core issue is.
they are all from the same umbraco install, i've been using 6.0. releases (probibly 6.0.4) but if there are no breaking changes then references from 6.1.1 should work.
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:
Line 92: if (Directory.Exists(path))
Line 93: {
Line 94: User user = new User(0);
Line 95:
Line 96: foreach (string file in Directory.GetFiles(path, "*.config"))
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.BusinessLogic.User.setupUser(Int32 ID) +96
umbraco.BusinessLogic.User..ctor(Int32 ID) +101
jumps.umbraco.usync.SyncTemplate.ReadFromDisk(String path) in d:\Delete-DavidTest\jumps.umbraco.usync\SyncTemplate.cs:94
jumps.umbraco.usync.SyncTemplate.ReadAllFromDisk() in d:\Delete-DavidTest\jumps.umbraco.usync\SyncTemplate.cs:87
jumps.umbraco.usync.uSync.ReadAllFromDisk() in d:\Delete-DavidTest\jumps.umbraco.usync\uSync.cs:155
jumps.umbraco.usync.uSync.RunSync() in d:\Delete-DavidTest\jumps.umbraco.usync\uSync.cs:247
jumps.umbraco.usync.uSync.DoOnStart() in d:\Delete-DavidTest\jumps.umbraco.usync\uSync.cs:67
jumps.umbraco.usync.uSync.OnApplicationStarted(UmbracoApplication httpApplication, ApplicationContext applicationContext) in d:\Delete-DavidTest\jumps.umbraco.usync\uSync.cs:294
Umbraco.Web.WebBootManager.b__3(IApplicationEventHandler x) +19
Umbraco.Core.EnumerableExtensions.ForEach(IEnumerable`1 items, Action`1 action) +141
Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete) +115
Umbraco.Web.UmbracoApplication.Application_Start(Object sender, EventArgs e) +138
[HttpException (0x80004005): Object reference not set to an instance of an object.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9859441
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): Object reference not set to an instance of an object.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873784
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
not sure here - there have been some (very minor) changes in the user class in the core in recent versions but nothing that should affect this call.
Equally i've just installed a clean v6.1.1 install and i can't recreate this error, stylesheets are importing fine for me.
i think the two errors in this thread are unrelated, the first one is something stopping templates formatting correctly, the second is stylesheet imports failing on your version of uSync.
if you can get me a zip copy of your usync folder i will have a look, and see if that sheds any light.
I have traced this to occurring when you have a //<![CDATA[ within any template, replace with standard <!-- and all is good, maybe a check can be built into uSync to handle this, I'm not sure.
Not sure you can just replace it as it then might make the XML inside umbraco invalid ??
if you've used CDATA iside a template theny you've probibly done it to mask some html inside XML - suppose there must be someway of nesting CDATA in XML (escaping?) so i'll try that.
uSync is using the standard umbraco package ToXML / Imports for this so it's actually something that would break if you created a package with these templates in too - if i can work out what it is - it might well benefit if it's added to the core too.
Unexpected end of file has occurred. The following elements are not closed: Design, Template. Line 5, position 11.
On install I consistantly get with both a late version of 4 and now the lates version 6.1.1 - any thoughts? Afterwards my Umbraco is corrupted.
Unexpected end of file has occurred. The following elements are not closed: Design, Template. Line 5, position 11.
it looks like the xml file for the template is invalid because their it is missing closing tags. (<pre><code>) this shouldn't matter as umbraco wraps the design section in <![CDATA[ ]]> anyway - but for some reason it's not doing that here... can you paste the def.config file for this template below ?
Where would I find the def.config? Are you referring to the umbraco.config in the App_Data folder?
I found it - how can I tell which def.config is erroring?
Silly question, but how do I set the #UMBRACO6 = true on compiler? I am trying to figure out exactly what the issue is. I have my own DLL but I suspect it is not hooking in properly as I get no error and no new files.
if you go to the properties section of your solution in visual studio, you can set UMBRACO6 in the condintional compilation symbols, you also need to ensure you are refrencing the umbraco 6 dlls in the solution.
but the version in GIT is setup for v6 and if you put the wrong version onto a v6 install you get a YSOD so if you don't get that then its something else might be stopping your version working.
Are some of these references from different version of Umbraco? Or can I just reference all from 6.1.1? One website we got it running, the other is throwing an odd error and we would really like to trace and report what the core issue is.
-David
they are all from the same umbraco install, i've been using 6.0. releases (probibly 6.0.4) but if there are no breaking changes then references from 6.1.1 should work.
Much better error, thanks for zipping that up.
Line 94: User user = new User(0);
Any thoughts?
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:
Line 92: if (Directory.Exists(path)) Line 93: { Line 94: User user = new User(0);
Source File: d:\Delete-DavidTest\jumps.umbraco.usync\SyncTemplate.cs Line: 94
Stack Trace:
SnapShot of our user data, we thought it might have been missing id 0; however, we are not:
Yes user0 is the default, lots of the internal code fails back to 0 if their is no current user.
Unfortunalty because usync is running at startup there isn't a user to attach to. but a lot of the import API need a user.
I'm guessing changes in underling code in 6.1 have changed this.
The error is with stylesheets because they are the first import API called that requires a user (templates don't for example!)
there are more user calls waiting in the rest of the code : (
I'll have to have a poke around and see if i can work out what has changed where in the umbraco core.
not sure here - there have been some (very minor) changes in the user class in the core in recent versions but nothing that should affect this call.
Equally i've just installed a clean v6.1.1 install and i can't recreate this error, stylesheets are importing fine for me.
i think the two errors in this thread are unrelated, the first one is something stopping templates formatting correctly, the second is stylesheet imports failing on your version of uSync.
if you can get me a zip copy of your usync folder i will have a look, and see if that sheds any light.
Hi Both,
I have traced this to occurring when you have a //<![CDATA[ within any template, replace with standard <!-- and all is good, maybe a check can be built into uSync to handle this, I'm not sure.
Cheers,
Jeavon
Thanks for tracking this down !
Not sure you can just replace it as it then might make the XML inside umbraco invalid ??
if you've used CDATA iside a template theny you've probibly done it to mask some html inside XML - suppose there must be someway of nesting CDATA in XML (escaping?) so i'll try that.
uSync is using the standard umbraco package ToXML / Imports for this so it's actually something that would break if you created a package with these templates in too - if i can work out what it is - it might well benefit if it's added to the core too.
I think the only time I've seen it inside a template is when it's used as comments inside a JS block, e.g:
is working on a reply...