Copied to clipboard

Flag this post as spam?

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


  • Daniel Reagan 19 posts 71 karma points
    Dec 31, 2014 @ 22:05
    Daniel Reagan
    0

    Upgrade to 7.2.1 Document Types Break

    When I upgrade to 7.2.1 via nuget, everything appears to go well until I try to look at Document Types in the back-office. at that point I get :

    at CallSite.Target(Closure , CallSite , Type , Object , Object )
       at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
       at CallSite.Target(Closure , CallSite , Type , Object , Object )
       at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.<MapContentTypes>b__d6(Object x)
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
       at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
       at System.Linq.Enumerable.<DistinctIterator>d__81`1.MoveNext()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
       at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.MapContentTypes(Int32[] contentTypeIds, Database db, IDictionary`2& associatedTemplates, IDictionary`2& parentContentTypeIds)
       at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.GetContentTypes[TRepo](Int32[] contentTypeIds, Database db, TRepo contentTypeRepository, ITemplateRepository templateRepository)
       at Umbraco.Core.Persistence.Repositories.ContentTypeRepository.PerformGetAll(Int32[] ids)
       at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.GetAll(TId[] ids)
       at Umbraco.Core.Persistence.Repositories.ContentTypeRepository.PerformGetByQuery(IQuery`1 query)
       at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.GetByQuery(IQuery`1 query)
       at Umbraco.Core.Services.ContentTypeService.GetContentTypeChildren(Int32 id)
       at umbraco.loadNodeTypes.Render(XmlTree& tree)
       at Umbraco.Web.Trees.ApplicationTreeExtensions.TryGetXmlTree(ApplicationTree appTree, String id, FormDataCollection formCollection)
       at Umbraco.Web.Trees.ApplicationTreeExtensions.TryLoadFromLegacyTree(ApplicationTree appTree, String id, FormDataCollection formCollection, UrlHelper urlHelper, String currentSection)
       at Umbraco.Web.Trees.LegacyTreeController.GetTreeNodes(String id, FormDataCollection queryStrings)
       at Umbraco.Web.Trees.TreeControllerBase.GetNodes(String id, FormDataCollection queryStrings)
       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.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4()
       at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)
    

    At server start I get:

    umbraco.content - [Thread 36] Loading content from database...
    2014-12-31 14:59:26,150 [30] ERROR umbraco.cms.businesslogic.web.DocumentType - [Thread 36] Exception while trying to build DTD for Xml schema; is Umbraco installed correctly and the connection string configured?
    Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The best overloaded method match for 'System.Tuple<bool?,int?>.Tuple(bool?, int?)' has some invalid arguments
       at CallSite.Target(Closure , CallSite , Type , Object , Object )
       at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
       at CallSite.Target(Closure , CallSite , Type , Object , Object )
       at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.<MapContentTypes>b__d6(Object x)
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
       at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
       at System.Linq.Enumerable.<DistinctIterator>d__81`1.MoveNext()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
       at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.MapContentTypes(Int32[] contentTypeIds, Database db, IDictionary`2& associatedTemplates, IDictionary`2& parentContentTypeIds)
       at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.GetContentTypes[TRepo](Int32[] contentTypeIds, Database db, TRepo contentTypeRepository, ITemplateRepository templateRepository)
       at Umbraco.Core.Persistence.Repositories.ContentTypeRepository.PerformGetAll(Int32[] ids)
       at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.GetAll(TId[] ids)
       at Umbraco.Core.Services.ContentTypeService.GetAllContentTypes(Int32[] ids)
       at umbraco.cms.businesslogic.web.DocumentType.GetAllAsList()
       at umbraco.cms.businesslogic.web.DocumentType.GenerateXmlDocumentType()
    
  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 01, 2015 @ 01:29
    Jan Skovgaard
    0

    Hi Daniel

    Could you try downloading v7.2.1 from from here http://our.umbraco.org/contribute/releases/721 and then copy over the /umbraco and /umbraco_client folder manually - Does that help any?

    Also could you try clearing the backoffice cache by going to the /config/ClientDependency.config file and increment the version attribute and then recycle the app pool to see if that makes any change?

    Hope this helps.

    /Jan

  • Daniel Reagan 19 posts 71 karma points
    Jan 02, 2015 @ 15:24
    Daniel Reagan
    0

    Jan, thanks for the help.

    I incremented the ClientDependency.config and that did seem to help. I can now at least open the docuement types and they iterate. However, when I try to view properties on any of them, I get the error.

    I have noticed this appears to be related to the number of "allowed templates" on my doctypes. If I add more than 4 to any particular nested doctype (with master) i get the error. First level doctypes don't get it.

    :

        The best overloaded method match for 'System.Tuple<bool?,int?>.Tuple(bool?, int?)' has some invalid arguments
    
    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: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The best overloaded method match for 'System.Tuple<bool?,int?>.Tuple(bool?, int?)' has some invalid arguments
    
    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: 
    
    
    [RuntimeBinderException: The best overloaded method match for 'System.Tuple<bool?,int?>.Tuple(bool?, int?)' has some invalid arguments]
       CallSite.Target(Closure , CallSite , Type , Object , Object ) +335
       System.Dynamic.UpdateDelegates.UpdateAndExecute3(CallSite site, T0 arg0, T1 arg1, T2 arg2) +262
       CallSite.Target(Closure , CallSite , Type , Object , Object ) +342
       Umbraco.Core.Persistence.Repositories.ContentTypeQueryMapper.<MapContentTypes>b__d6(Object x) +1634
       System.Linq.WhereSelectListIterator`2.MoveNext() +108
       System.Linq.WhereEnumerableIterator`1.MoveNext() +85
       System.Linq.<DistinctIterator>d__81`1.MoveNext() +165
       System.Linq.Buffer`1..ctor(IEnumerable`1 source) +216
       System.Linq.<GetEnumerator>d__0.MoveNext() +106
       System.Linq.Buffer`1..ctor(IEnumerable`1 source) +216
       System.Linq.Enumerable.ToArray(IEnumerable`1 source) +77
       Umbraco.Core.Persistence.Repositories.ContentTypeQueryMapper.MapContentTypes(Int32[] contentTypeIds, Database db, IDictionary`2& associatedTemplates, IDictionary`2& parentContentTypeIds) +2327
       Umbraco.Core.Persistence.Repositories.ContentTypeQueryMapper.GetContentTypes(Int32[] contentTypeIds, Database db, TRepo contentTypeRepository, ITemplateRepository templateRepository) +111
       Umbraco.Core.Persistence.Repositories.ContentTypeRepository.PerformGetAll(Int32[] ids) +944
       Umbraco.Core.Persistence.Repositories.RepositoryBase`2.GetAll(TId[] ids) +3100
       Umbraco.Core.Services.ContentTypeService.GetAllContentTypes(Int32[] ids) +112
       umbraco.controls.ContentTypeControlNew.SetupCompositionsPane() +414
       umbraco.controls.ContentTypeControlNew.OnInit(EventArgs e) +140
       System.Web.UI.Control.InitRecursive(Control namingContainer) +134
       System.Web.UI.Control.InitRecursive(Control namingContainer) +290
       System.Web.UI.Control.InitRecursive(Control namingContainer) +290
       System.Web.UI.Control.InitRecursive(Control namingContainer) +290
       System.Web.UI.<InitRecursiveAsync>d__0.MoveNext() +277
       System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +93
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +52
       System.Web.Util.WithinCancellableCallbackTaskAwaiter.GetResult() +30
       System.Web.UI.<ProcessRequestMainAsync>d__14.MoveNext() +2353
    
  • Daniel Reagan 19 posts 71 karma points
    Jan 05, 2015 @ 22:17
    Daniel Reagan
    0

    Also, if I add one "allowed template" to many nested doctypes (around 20) I get the error...

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 07, 2015 @ 09:19
    Jan Skovgaard
    0

    Hi Daniel

    Do you have any 3rd party packages installed, which could be the cause of this?

    /Jan

  • Daniel Reagan 19 posts 71 karma points
    Jan 07, 2015 @ 14:52
    Daniel Reagan
    0

    Possibly, I removed usync, but the problem persisted. I have archetype (but it is un-used) and the core-property-value-converters installed. I haven't gotten to try removing those, removing the core-property-value-converters would be difficult as we're using them.

  • Daniel Reagan 19 posts 71 karma points
    Jan 09, 2015 @ 22:44
    Daniel Reagan
    0

    Removed all packages, no dice... using MYSQL 5.6 if that matters. Pity, we were hoping to get the new grid and query features. Running a pretty big project on a tight deadline. Gonna have to stick with 7.1.8 for now I guess...

  • Pierre Bakker 3 posts 23 karma points
    Jan 10, 2015 @ 20:37
    Pierre Bakker
    0

    Hi,

    I have the same problem. I have tried to install a package on a fresh installed umbraco version 7.2.1 instance. I used nuget. The package contained some base doctypes I use to setup a website. Nothing special but it contains nested doctypes aswell. The installation did not complete and crashed with the same 'tuple' exception as above. It turned out the doctypes were installed, but when I try to open them I get the exception again,

    I tried clearing the cache and copy the release files, no success.

    The package i tried to install is created using umbraco 7.1.6 and I also use MySql.

    The log also shows a message: "Removed all items older than 2014-11-11" just befor the exception (during installation) occurs. Not sure if it is related.

    Any ideas on how to solve this?

    THnx,

    Pierre

  • Agostinho Teixeira 1 post 22 karma points
    Jan 12, 2015 @ 23:58
    Agostinho Teixeira
    1

    Hi,

    I have the same problem, and I have made checkout of Umbraco source code, I run it in debug mode and one of the parts of code that have exception:

    Class Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository

                        //get the unique list of associated templates
                        var defaultTemplates = result
                            .Where(x => x.ctId == currentCtId)
                            //use a tuple so that distinct checks both values
                            .Select(x => new Tuple<bool?, int?>(x.dtIsDefault, x.dtTemplateId))
                            .Where(x => x.Item1.HasValue && x.Item2.HasValue)
                            .Distinct()
                            .OrderByDescending(x => x.Item1.Value)
                            .ToArray();

    the problem is that on MySQL database sometimes the return datatype of x.IsDefault is sbyte and bool was expected.

    For testing I change for .Select(x => new Tuple<bool?, int?>(Convert.ToBoolean(x.dtIsDefault), x.dtTemplateId)), and the problem was solved, but this is not the correct solution, because the problem is in  var result = db.Fetch<dynamic>(sql,...).

    I think the real problem is in Umbraco.Core.Persistence.PetaPoco class.

    Best Regards,

    A. Teixeira

     

     

  • Rob Henry 1 post 21 karma points
    Jan 31, 2015 @ 02:31
    Rob Henry
    0

    I apologize, but i'm probably at the level of "pre-newb". I've been working with Umbraco for a couple months and learning as I go, but again Level "pre-newb"...

    I'm getting this same error ("The best overloaded method match for'System.Tuple<bool?,int?>.Tuple(bool?, int?)' has some invalid arguments"). I started my new site with version 7.2.1 and have created several Document Types (exactly 17, with 10 of them nested) with no problems. Last night, I simply wanted to created a new Document Type, but as soon as I hit Save, I received this System.Tuple error. Republishing the Entire Site sometimes lets me move on, but the error returns whenever I try to expand the Document Types node. I had a backup of the files and database, so I restored; but as soon as I try to add another Document Type, the error returns again.

    I've tried copying in a fresh copy of the Umbraco and Umbraco_Client folders for version 7.2.1, incrementing the version in the ClientDependency.config file, and recycling the AppPool. Whatever I do doesn't matter, because the error returns when I try to expand the Document Types node.

    Any ideas?

  • Scott Meikle 28 posts 228 karma points
    Feb 02, 2015 @ 12:05
    Scott Meikle
    0

    Hello everyone,

    I have run into a very similar problem with a fresh 7.2.1. install. I have 13 Document Types (all un-nested) and after adding a new one (with "create matching template" checked) and saving it, I could no longer expand the Document Type tree on the Settings page - instead, I got a red floating error notification with the message "failed to retrieve data for child nodes undefined". I had to go into the database and remove the new Document Type (and it's new default template), after which I was able to open my Document Type tree again (phew!).

    After a bit of experimentation, I found that I could create and save a new Document Type (with no allowed templates) but if I went back and assigned it even one single allowed template, the previous error condition would recur. The reason that I think this issue is related to the problem the rest of the folk on this thread are getting is that, during the course of my experimentation in restoring my document tree, I also saw that System.Tuple<bool?,int?>.Tuple(bool?, int?) error when trying to look at a Document Type, though I can quite nail down the steps of how I got there (was in a bit of a panic trying to get my Document Types back, TBH!). The other thing possibly in common is that my system is also based on MySQL (version 5.5.34). I don't have any custom packages installed either.

    I am lucky that at this stage of my project, I don't actually need to add any more new document types - I was able to re-cycle one of the existing ones I had while using a different template...

    Cheers,

    Scott

  • Pierre Bakker 3 posts 23 karma points
    Feb 02, 2015 @ 19:43
    Pierre Bakker
    0

    Hi,

    Nice digging Agostohno!

    After reading your findings I tried to change the column (IsDefault) type to bit(1), but that did'n help, obviously. After reading some interesting posts on stackoverflow and digging in the MySql documentation I think the reason this error occurs is because of the fact MySql does not "know" a bool or Boolean type. The bool or Boolean type in MySql is a synonym for the type tinyint(1), which is an integer that can hold a value 0-255 I believe. The reason bit(1) will not work is because unlike in MSSql this is not an integer at all. it's something else.

    So to use a Boolean in MySql a tinyint(1) type is required. I find more people are having difficulties using this type as a Boolean type in EF, MySql provider or even plain old datareaders. I think the only way to deal with this tiniyint(1) is to add the Convert.ToBoolean as Agostohno suggests. I guess this is a change in the Umbraco Core source, right? Can we file a bug or something? (i'm not familiar with umbraco bug registration/tracking)

    cheers,

    Pierre

     

  • Daniel Reagan 19 posts 71 karma points
    Feb 02, 2015 @ 20:45
    Daniel Reagan
    0

    http://issues.umbraco.org/

    Is the issue tracker if you can word it / provide the information to reproduce...

  • Dennis Öhman 32 posts 177 karma points c-trib
    Feb 20, 2015 @ 20:15
    Dennis Öhman
    0

    Is there a fix or an issue (number) added for this? Or does anyone have a fix without adding a custom bool converting as Agostinho Teixeira did?

    Is it a problem with petapoco type conversion? I can remember having similar issues with an older version of EF.
    I know the correct type for tinyint(1) signed is SByte, but, why doesn't it throw an exception right from the start? 

    For the moment we have three client's having the same issue, after some time.
    Converting to mssql is a big task and not an option at the moment =) 

  • Daniel Reagan 19 posts 71 karma points
    Feb 20, 2015 @ 20:36
    Daniel Reagan
    0

    Not that I know of. I scoured issues.umbraco.org a while back and didn't find anything. Tried 7.2.2 this morning, and issue still exists...

    Maybe one of you techier-types could post it to issues?

  • Dennis Öhman 32 posts 177 karma points c-trib
    Feb 20, 2015 @ 20:59
    Dennis Öhman
    1

    I have added it to the issue tracker.
    http://issues.umbraco.org/issue/U4-6304 ;

  • Shannon Deminick 1524 posts 5270 karma points MVP 2x
    Mar 05, 2015 @ 07:45
    Shannon Deminick
    0

    Hi, I'm looking into this issue today. I think the real underlying issue is the way that PetaPoco deals with 'dynamic'. We have plenty of strongly typed DTO models that map correctly to bool with MySql so it has to be how PetaPoco treats a dynamic results that isn't mapped to a strongly typed model... which is of course unfortunate.

    I'll have a look through the codebase to see where we might be using dynamic results with PetaPoco and deal with the bools accordingly. Thanks everyone for investigating this one.

  • Fred Lou 4 posts 24 karma points
    Mar 05, 2015 @ 11:46
    Fred Lou
    0

    i'm having the same problem earlier. Thanks for the info guys

  • Bruno Martens 2 posts 22 karma points
    Mar 06, 2015 @ 22:44
    Bruno Martens
    0

    Hi,

    I got the same error. I just set up a simple site (2 document types and 1 master page) on v7.2.2 with a MySql db (5.1.73-community). When I added a third document type, the error popped up.

    System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The best overloaded method match for 'System.Tuple<bool?,int?>.Tuple(bool?, int?)' has some invalid arguments at CallSite.Target(Closure , CallSite , Type , Object , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at CallSite.Target(Closure , CallSite , Type , Object , Object ) at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.<MapContentTypes>b__d6(Object x) at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at System.Linq.Enumerable.<DistinctIterator>d__81`1.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.MapContentTypes(Int32[] contentTypeIds, Database db, IDictionary`2& associatedTemplates, IDictionary`2& parentContentTypeIds) at Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository`1.ContentTypeQueryMapper.GetContentTypes[TRepo](Int32[] contentTypeIds, Database db, TRepo contentTypeRepository, ITemplateRepository templateRepository) at Umbraco.Core.Persistence.Repositories.ContentTypeRepository.PerformGetAll(Int32[] ids) at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.GetAll(TId[] ids) at Umbraco.Core.Services.ContentTypeService.GetAllContentTypes(Int32[] ids) at umbraco.controls.ContentTypeControlNew.SetupCompositionsPane() at umbraco.controls.ContentTypeControlNew.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.<InitRecursiveAsync>d__0.MoveNext()

     

     

     

     

     

     

  • Daniel Reagan 19 posts 71 karma points
    Mar 06, 2015 @ 23:31
    Daniel Reagan
    100

    This is fixed in the dev-v7 branch. see: https://github.com/umbraco/Umbraco-CMS/pull/647.

    Upgrading to 7.2.2 via nuget and then manually pulling in the umbraco.core.dll from dev-v7 branch: https://github.com/umbraco/Umbraco-CMS confirmed fixes it for me.

    Looks like the fix will land in v 7.2.3: https://our.umbraco.org/contribute/releases/723 around the 19th of March.

    Thanks Jonas and Shannon.

  • Bruno Martens 2 posts 22 karma points
    Mar 08, 2015 @ 01:25
    Bruno Martens
    0

    This fixed it for me too. Thanks

  • pronto 61 posts 172 karma points
    Mar 10, 2015 @ 13:04
    pronto
    0

    Whereabouts is the umbraco.core.dll file on that github link? It's driving me crazy!

  • John Churchley 272 posts 1258 karma points c-trib
    Mar 10, 2015 @ 15:02
    John Churchley
    0

    @Pronto the link previous is for the Umbraco project (uncompiled code). If you pull down the whole repository and build the project (open the soltution file in Visual Studio right click the project and rebuild) it will create the assemblies (dlls) in a bin folder for you. 

     

  • Mario Patrao 8 posts 28 karma points
    Mar 12, 2015 @ 16:58
    Mario Patrao
    0

    Hello,

    I've been waiting awhile for this solution :)

    Is it just the umbraco.core.dll that I need to replace or am I missing something more? I re-build the solution to get the new dll, copy it to my project but the the problem still exists.

    Thanks in advance.

  • Mario Patrao 8 posts 28 karma points
    Mar 12, 2015 @ 17:53
    Mario Patrao
    0

    I re-builded my project again with the new dll and on second go it worked. Bit strange but happy that it's working

Please Sign in or register to post replies

Write your reply to:

Draft