Copied to clipboard

Flag this post as spam?

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

  • Jeremy Schlosser 14 posts 84 karma points
    Sep 21, 2017 @ 19:38
    Jeremy Schlosser

    Umbraco.Web.Editors.SectionController.GetSections causes exception: Index was out of range

    Trying to upgrade from 7.5.8 to 7.7.1. Upgrade is successful, until I go into the Back Offfice. There are no section nodes displayed. I can navigate to the sections using the URL. But I repeatedly get the Index was out of range (500) error on ./umbraco/backoffice/UmbracoApi/Section/GetSections in addition to a 404 error for ./umbraco/ysod.

  • milkman matty 31 posts 125 karma points
    Sep 24, 2017 @ 22:51
    milkman matty

    I am getting these exact same issues. Also upgraded from 7.5.8 to 7.7.1.

    EDIT: Removing all custom code relating to sections fixed this issue for me. When I deleted the files containing section code from the original solution, cleaned and then built the solution the problem was still there.

    So what I ended up doing was: I had to create a new umbraco solution, copy over the all the files except for those that contained any section code and carry on from there.

  • Daniel Bardi 927 posts 2562 karma points
    Oct 09, 2017 @ 05:50
    Daniel Bardi

    I have a similar problem after upgrading from 7.5.8 to 7.7.2.

    I can browse backoffice by url. Only section that doesn't come up is Users. I also do not have the section icons.

    {"Message":"An error has occurred.","ExceptionMessage":"One or more errors occurred.","ExceptionType":"System.AggregateException","StackTrace":" at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)\r\n at Umbraco.Web.Editors.SectionController.GetSections()\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass10.9(Object instance, Object[] methodParameters)\r\n" ... }

  • Daniel Bardi 927 posts 2562 karma points
    Oct 09, 2017 @ 06:06
    Daniel Bardi

    I deleted the Umbraco.Forms assemblies from the bin and now it's working..

  • Jeremy Schlosser 14 posts 84 karma points
    Oct 09, 2017 @ 16:41
    Jeremy Schlosser

    Not using Umbraco Forms here...

  • Francielle 65 posts 279 karma points
    Oct 18, 2017 @ 18:48

    Any luck on this? Having the same problem here.

  • Francielle 65 posts 279 karma points
    Oct 19, 2017 @ 10:04

    I fixed my problem. On my /config/trees/config there were some custom sections added by packages Diplo.AuditLog and LeBlender and these were generating the error. I overwrote the file with the one that comes in Umbraco's .zip and it worked.

  • Jeremy Schlosser 14 posts 84 karma points
    Oct 19, 2017 @ 16:29
    Jeremy Schlosser

    That did not fix the issue for me. I only have a couple custom entries in tree.config and removing them didn't help. Neither did replacing the file with the downloaded version.

  • Francielle 65 posts 279 karma points
    Oct 19, 2017 @ 16:53

    Is there any error on App_Data/Logs? Or just the ones on the console?

  • Francielle 65 posts 279 karma points
    Oct 19, 2017 @ 16:54

    One important thing here, ClientDependency keeps cache of the files, so at first my solution did not work. I had to open the file /config/ClientDependency and modify the version so it would clear the cache.

  • Jeremy Schlosser 14 posts 84 karma points
    Oct 19, 2017 @ 17:10
    Jeremy Schlosser

    I'm getting the same error in the log file: ERROR Umbraco.Web.Editors.SectionController - Unhandled controller exception occurred System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

  • Biagio Paruolo 1582 posts 1813 karma points c-trib
    Nov 16, 2017 @ 22:03
    Biagio Paruolo

    This solution works for me.

  • Anders Brohäll 295 posts 561 karma points c-trib
    Oct 24, 2017 @ 20:22
    Anders Brohäll

    I'm having the same problem, going from 7.5.11 up to 7.7.x. Also tried on a similar instance going from 7.6.4 without luck. I narrowed it down to the Users entry in the applications.config. If i create a user accessing all applications/sections except for the Users, it works for that user.

    Thus. I don't think its a question of a config section for me.

    My application.config looks like this:

      <add alias="content" name="Content" icon="traycontent" sortOrder="0"/>
      <add alias="media" name="Media" icon="traymedia" sortOrder="1"/>
      <add alias="settings" name="Settings" icon="traysettings" sortOrder="2"/>
      <add alias="developer" name="Developer" icon="traydeveloper" sortOrder="3"/>
      <add alias="users" name="Users" icon="trayusers" sortOrder="4"/>
      <add alias="member" name="Members" icon="traymember" sortOrder="5"/>
      <add alias="forms" name="Forms" icon="icon-umb-contour" sortOrder="6"/>
      <add alias="translation" name="Translation" icon="traytranslation" sortOrder="7"/>

    My trees.config:

        <add initialize="true" sortOrder="0" alias="content" application="content" title="Content" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.ContentTreeController, umbraco" />
        <add initialize="false" sortOrder="0" alias="contentRecycleBin" application="content" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.ContentRecycleBin, umbraco" />
        <add initialize="true" sortOrder="0" alias="media" application="media" title="Media" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.MediaTreeController, umbraco" />
        <add initialize="false" sortOrder="0" alias="mediaRecycleBin" application="media" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.MediaRecycleBin, umbraco" />
        <add initialize="true" sortOrder="0" alias="documentTypes" application="settings" title="Document Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.ContentTypeTreeController, umbraco" />
        <add application="settings" alias="templates" title="Templates" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.TemplatesTreeController, umbraco" initialize="true" sortOrder="1" />
        <add application="settings" alias="partialViews" title="Partial Views" silent="false" initialize="true" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.PartialViewsTreeController, umbraco" sortOrder="2" />
        <add application="settings" alias="stylesheets" title="Stylesheets" type="umbraco.loadStylesheets, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="3" />
        <add application="settings" alias="stylesheetProperty" title="Stylesheet Property" type="umbraco.loadStylesheetProperty, umbraco" iconClosed="" iconOpen="" initialize="false" sortOrder="0" />
        <add application="settings" alias="scripts" title="Scripts" type="Umbraco.Web.Trees.ScriptTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4" />
        <add application="settings" alias="languages" title="Languages" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.LanguageTreeController, umbraco" sortOrder="5" />
        <add application="settings" alias="dictionary" title="Dictionary" type="umbraco.loadDictionary, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6" />
        <add initialize="true" sortOrder="7" alias="mediaTypes" application="settings" title="Media Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MediaTypeTreeController, umbraco" />
        <add initialize="true" sortOrder="8" alias="contentBlueprints" application="settings" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.ContentBlueprintTreeController, umbraco" />
        <add initialize="true" sortOrder="0" alias="packager" application="developer" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.PackagesTreeController, umbraco" />
        <add initialize="true" sortOrder="1" alias="dataTypes" application="developer" title="Data Types" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.DataTypeTreeController, umbraco" />
        <add application="developer" alias="macros" title="Macros" type="umbraco.loadMacros, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="2" />
        <add application="developer" alias="relationTypes" title="Relation Types" type="umbraco.loadRelationTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4" />
        <add application="developer" alias="xslt" title="XSLT Files" type="umbraco.loadXslt, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="5" />
        <add application="developer" alias="partialViewMacros" type="Umbraco.Web.Trees.PartialViewMacrosTreeController, umbraco" silent="false" initialize="true" sortOrder="6" title="Partial View Macro Files" iconClosed="icon-folder" iconOpen="icon-folder" />
        <add initialize="true" sortOrder="0" alias="users" application="users" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.UserTreeController, umbraco" />
        <add initialize="true" sortOrder="0" alias="member" application="member" title="Members" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MemberTreeController, umbraco" />
        <add initialize="true" sortOrder="1" alias="memberTypes" application="member" title="Member Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MemberTypeTreeController, umbraco" />
        <add application="member" sortOrder="2" alias="memberGroups" title="Member Groups" type="umbraco.loadMemberGroups, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" />
        <add silent="false" initialize="true" sortOrder="1" alias="openTasks" application="translation" title="Tasks assigned to you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadOpenTasks, umbraco" />
        <add silent="false" initialize="true" sortOrder="2" alias="yourTasks" application="translation" title="Tasks created by you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadYourTasks, umbraco" />

    ... Vanilla Umbraco 7.7.4. (apart from moving the contentBlueprints from the Custom section to the Settings section in the XML)

    Whilst debugging this issue i reinstalled and upgraded and tried adding logic little by little. But I'm out of luck.

    Did you guys figure out what to do?

  • Anders Brohäll 295 posts 561 karma points c-trib
    Oct 24, 2017 @ 21:20
    Anders Brohäll

    Turns out it was a Structure Map issue in our solution. All good now.

  • Daryl 5 posts 75 karma points
    Nov 08, 2017 @ 12:49

    I have encountered a similar issue when trying to update from 7.6.4 to 7.7.4

    After finishing the update, accessing the CMS results in these 2 errors popping up:

    GET http://localhost/umbraco/backoffice/UmbracoApi/Section/GetSections 500 (Internal Server Error)

    GET http://localhost/umbraco/ysod 404 (Not Found)

    None of what has been discussed above seemed to help with regards to this issue, and I'm completely stuck.

    Any help would be highly appreciated please.

    Thank You

  • David Parr 48 posts 206 karma points
    Nov 08, 2017 @ 14:01
    David Parr

    Hi Daryl,

    Could you please check the UmbracoTraceLog (in App_Data/logs) and let us know if there are any more detailed error logs?


  • Daryl 5 posts 75 karma points
    Nov 08, 2017 @ 14:44

    Hi David,

    I had rolled back the installation to try to carry on working, but decided to re-update once you replied.

    The exact same thing happened again...

    This is something that I found within the UmbracoTraceLog:

    2017-11-08 15:40:26,399 [P13056/D7/T47] ERROR Umbraco.Web.Editors.SectionController - Unhandled controller exception occurred System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object. at System.Object.GetType() at Umbraco.Web.Trees.ApplicationTreeExtensions.

  • Henrik Bäck 12 posts 72 karma points
    Nov 21, 2017 @ 11:38
    Henrik Bäck
  • Nicola Ayan 7 posts 76 karma points
    Feb 21, 2018 @ 11:52
    Nicola Ayan

    I had the same issue and was able to fix it by registering UmbracoContext and several Umbraco Controllers on the UnityConfig.cs. Tutorial available on:

Please Sign in or register to post replies

Write your reply to: