Copied to clipboard

Flag this post as spam?

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


  • Sandro Mastronardi 11 posts 69 karma points
    Sep 15, 2014 @ 10:04
    Sandro Mastronardi
    0

    Enabling distributed calls causes an exception to appear in log

    Hi,

    I encountered an error when distributed calls are enabled, the logs show this error:

    System.InvalidOperationException: Cannot refresh by id if the idArrayType is null
       at Umbraco.Core.Sync.DefaultServerMessenger.PerformDistributedCall(IEnumerable`1 servers, ICacheRefresher refresher, MessageType dispatchType, IEnumerable`1 ids, Type idArrayType, String jsonPayload) in c:\GITProjects\Umbraco-CMS-7.1.4\Umbraco-CMS-7.1.4\src\Umbraco.Core\Sync\DefaultServerMessenger.cs:line 431

    It occurs when I Save And Publish a new node. Umbraco publishes the new node, and also tries to publish all other related unpublished nodes... if there are none, it passes an empty array, this causes the idArrayType not being set (since there is nothing to save) and throwing the error...

    The cause, though, seems to be higher up the call stack in the CacheRefreshEventHandler...
    There I find this piece of code:

                //filter out the entities that have only been saved (not newly published) since
                // newly published ones will be synced with the published page cache refresher
                var unpublished = e.SavedEntities.Where(x => x.JustPublished() == false);
                //run the un-published cache refresher
                DistributedCache.Instance.RefreshUnpublishedPageCache(unpublished.ToArray());

    The unpublished list is empty and should not be passed on anyways, but because it is passed, the idArrayType cannot be set, and the error is thrown...

    An if(unpublished.Any()) would solve this...

    The bug does not seem to be a huge problem, but it causes the logs of a new site (being filled with new content) to have a lot of errors in the logs...

    Hope someone can look into this, or tell me what I'm doing wrong :-)

    Best Regards,

    Sandro Mastronardi

     

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Sep 15, 2014 @ 21:29
    Dan Diplo
    0

    Hi! You might be better off adding this to the Issue tracker at http://issues.umbraco.org/dashboard  - and maybe check if it has been fixed in a later version?

  • Shannon Deminick 1524 posts 5270 karma points MVP 2x
    Sep 16, 2014 @ 02:26
    Shannon Deminick
    0

    I feel like this may be fixed in 7.1.5+ as I've seen the issue before, any chance you might try upgrading to 7.1.6 and see if that fixes it?

    Also note, this issue with LB and 7.1.6, there's a workaround posted: http://issues.umbraco.org/issue/U4-5491

Please Sign in or register to post replies

Write your reply to:

Draft