Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Dimmer 76 posts 134 karma points
    Jun 06, 2013 @ 20:40
    David Dimmer
    0

    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.

    <code><pre>
     
      [XmlException: Unexpected end of file has occurred. The following elements are not closed: Design, Template. Line 5, position 11.]
      System.Xml.XmlTextReaderImpl.Throw(Exception e) +69
      System.Xml.XmlTextReaderImpl.Throw(String res, String arg) +116
      System.Xml.XmlTextReaderImpl.ThrowUnclosedElements() +250
      System.Xml.XmlTextReaderImpl.ParseElementContent() +5576284
      System.Xml.XmlTextReaderImpl.Read() +44
      System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) +57
      System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +20
      System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +162
      System.Xml.XmlDocument.Load(XmlReader reader) +107
      System.Xml.XmlDocument.Load(String filename) +122
      jumps.umbraco.usync.SyncTemplate.ReadFromDisk(String path) +182
      jumps.umbraco.usync.SyncTemplate.ReadFromDisk(String path) +276
      jumps.umbraco.usync.SyncTemplate.ReadAllFromDisk() +57
      jumps.umbraco.usync.uSync.ReadAllFromDisk() +55
      jumps.umbraco.usync.uSync.RunSync() +217
      jumps.umbraco.usync.uSync.DoOnStart() +111
      jumps.umbraco.usync.uSync.OnApplicationStarted(UmbracoApplicationBase httpApplication, ApplicationContext applicationContext) +5
      Umbraco.Core.CoreBootManager.&lt;Complete&gt;b__4(IApplicationEventHandler x) +19
      Umbraco.Core.EnumerableExtensions.ForEach(IEnumerable`1 items, Action`1 action) +141
      Umbraco.Core.CoreBootManager.Complete(Action`1 afterComplete) +119
      Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete) +26
      Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +157
      Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e) +9
     
      [HttpException (0x80004005): Unexpected end of file has occurred. The following elements are not closed: Design, Template. Line 5, position 11.]
      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): Unexpected end of file has occurred. The following elements are not closed: Design, Template. Line 5, position 11.]
      System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873784
      System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
      System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
      </pre></code>
       
  • Kevin Jump 2310 posts 14694 karma points MVP 7x c-trib
    Jun 06, 2013 @ 22:47
    Kevin Jump
    0

    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 ? 

     

     

  • David Dimmer 76 posts 134 karma points
    Jun 07, 2013 @ 00:11
    David Dimmer
    0

    Where would I find the def.config?  Are you referring to the umbraco.config in the App_Data folder? 

  • David Dimmer 76 posts 134 karma points
    Jun 07, 2013 @ 00:39
    David Dimmer
    0

    I found it - how can I tell which def.config is erroring?  

  • David Dimmer 76 posts 134 karma points
    Jun 07, 2013 @ 00:47
    David Dimmer
    0
    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
    
  • David Dimmer 76 posts 134 karma points
    Jun 07, 2013 @ 03:31
    David Dimmer
    0

    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. 

  • Kevin Jump 2310 posts 14694 karma points MVP 7x c-trib
    Jun 07, 2013 @ 08:28
    Kevin Jump
    0

    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. 

  • David Dimmer 76 posts 134 karma points
    Jun 10, 2013 @ 21:15
    David Dimmer
    0

    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 


  • Kevin Jump 2310 posts 14694 karma points MVP 7x c-trib
    Jun 10, 2013 @ 21:36
    Kevin Jump
    0

    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. 

  • David Dimmer 76 posts 134 karma points
    Jun 10, 2013 @ 23:52
    David Dimmer
    0

    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);
    Line 95: 
    Line 96:                 foreach (string file in Directory.GetFiles(path, "*.config"))


    Source File: d:\Delete-DavidTest\jumps.umbraco.usync\SyncTemplate.cs    Line: 94 

    Stack Trace: 

    [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

     

  • David Dimmer 76 posts 134 karma points
    Jun 11, 2013 @ 00:00
    David Dimmer
    0

    SnapShot of our user data, we thought it might have been missing id 0; however, we are not:

     

  • Kevin Jump 2310 posts 14694 karma points MVP 7x c-trib
    Jun 11, 2013 @ 08:37
    Kevin Jump
    0

    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. 

     

     

  • Kevin Jump 2310 posts 14694 karma points MVP 7x c-trib
    Jun 11, 2013 @ 19:43
    Kevin Jump
    0

    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. 

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Jul 22, 2013 @ 18:26
    Jeavon Leopold
    0

    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

  • Kevin Jump 2310 posts 14694 karma points MVP 7x c-trib
    Jul 22, 2013 @ 20:06
    Kevin Jump
    0

    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. 

     

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Jul 22, 2013 @ 20:11
    Jeavon Leopold
    0

    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:

    <script type="text/javascript">
        //<![CDATA[
        $(document).ready(function () {
            alert("the most awesome thing ever");
        });
        //]]> 
    </script>
Please Sign in or register to post replies

Write your reply to:

Draft