Copied to clipboard

Flag this post as spam?

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


  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 18, 2013 @ 13:50
    Anthony Dang
    0

    Crash

    This is more of an Umbraco bug, but it's probably worth adding a try-catch or a check.

    Basically a datatype was deleted, but an entry remained in the db. So on app start, the site doesnt work at all due to uSync crashing. It's an Umbraco db issue, but I think doing a check is worth while.

     

    [ArgumentException: No dataType with id = 1045 found]
       umbraco.cms.businesslogic.datatype.DataTypeDefinition.setupNode() +373
       umbraco.cms.businesslogic.datatype.DataTypeDefinition.GetDataTypeDefinition(Guid id) +160
       umbraco.cms.businesslogic.datatype.DataTypeDefinition.GetAll() +260
       jumps.umbraco.usync.SyncDataType.SaveAllToDisk() +12
       jumps.umbraco.usync.uSync.RunSync() +222
       jumps.umbraco.usync.uSync.DoOnStart() +100
       Umbraco.Core.EnumerableExtensions.ForEach(IEnumerable`1 items, Action`1 action) +148
       Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete) +124

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Mar 18, 2013 @ 14:39
    Kevin Jump
    0

    Yeah - and i put try catches around 'almost' everything in the last version! but not GetAll it's an easy fix: I have put it into the next version. 

    My main concern is that the error is within the DataTypeDefinition.GetAll() function, so when it fails uSync gets nothing back for DataTypes, so won't be writing any data types back to disk, and while i'm writing to the Log, no one ever checks that :) - so it could be some time before you know non of your work is backed up

    Issue:

    This is an issue on startup and if : you have Write=true in the config or if you are on a version lower than 4.11.5/6.0.4 

    on later version attach works for datatypes so they are not written at every start-up 

    it also looks like their is no exposed Enumerator for DataTypeDefinition so i can't go get each one and check myself :( 

    Workaround : 

    To get your version of umbraco backup from this error (4.11.4/6.0.0), you can

    a) set Attach = "false" un uSyncSettings.config, and it won't try to write DataTypes at startup (it won't write any saves to disk, but you can get your version going 

    b) remove the uSync dll (booooo) - from the bin folder.

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 18, 2013 @ 14:58
    Anthony Dang
    0

    I think there's nothing you can reasonably do about Umbraco bugs except report them. Unless you want to write some sql to hit the db yourself. This would be fantastic if usync would fall back to sql, however I personally would not bother.

     

     

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Mar 18, 2013 @ 16:09
    Kevin Jump
    0

    I think it's more of hte same issue i hit with uSync on 4.11.4/6.0.0 at some point it looks like most of the type code was updated, and DataTypeDefintion wasn't - it means it has odd behavior that you don't get with things like Macro, DocumentTypes. 

    I'm not doing SQL fall back, don't want to step beyond the business logic in umbraco and become vunrable to logic or schema changes. 

    when the ServiceModels are mature in Umbraco 6 - this will all be much simpler : ) 

     

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Mar 20, 2013 @ 00:54
    Kevin Jump
    0

    Code to stop this crash is now in v1.1.1 release

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 20, 2013 @ 10:56
    Anthony Dang
    0

    nice... any other up coming realeses?

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Mar 20, 2013 @ 17:45
    Kevin Jump
    0

    don't know what do you think : ) 

    on my list

    • Relations
    • Working out a way to capture just files (ie .js, .cshtml, .xslt) to make it a single folder deployment
    • something fancy to maintain DataTypeDefinition List values between installs (probibly a SQL table with Guids)
    • webservice? so you can poll usync with out app-restart
    • dashboard ? - not sure what you would put in it. 
Please Sign in or register to post replies

Write your reply to:

Draft