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 13 posts 83 karma points
    Sep 21, 2017 @ 19:38
    Jeremy Schlosser
    0

    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 13 posts 92 karma points
    Sep 24, 2017 @ 22:51
    milkman matty
    0

    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 913 posts 2540 karma points
    Oct 09, 2017 @ 05:50
    Daniel Bardi
    0

    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 913 posts 2540 karma points
    Oct 09, 2017 @ 06:06
    Daniel Bardi
    1

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

  • Jeremy Schlosser 13 posts 83 karma points
    Oct 09, 2017 @ 16:41
    Jeremy Schlosser
    0

    Not using Umbraco Forms here...

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

    Any luck on this? Having the same problem here.

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

    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 13 posts 83 karma points
    Oct 19, 2017 @ 16:29
    Jeremy Schlosser
    0

    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 278 karma points
    Oct 19, 2017 @ 16:53
    Francielle
    0

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

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

    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 13 posts 83 karma points
    Oct 19, 2017 @ 17:10
    Jeremy Schlosser
    0

    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 1456 posts 1595 karma points c-trib
    Nov 16, 2017 @ 22:03
    Biagio Paruolo
    0

    This solution works for me.

  • Anders Brohäll 288 posts 552 karma points
    Oct 24, 2017 @ 20:22
    Anders Brohäll
    0

    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:

    <applications>
      <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"/>
    </applications>
    

    My trees.config:

       <trees>
        <!--Content-->
        <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" />
        <!--Media-->
        <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" />
        <!--Settings-->
        <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" />
        <!--Developer-->
        <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" />
        <!--Users-->
        <add initialize="true" sortOrder="0" alias="users" application="users" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.UserTreeController, umbraco" />
        <!--Members-->
        <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" />
        <!--Translation-->
        <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" />
    </trees>
    

    ... 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 288 posts 552 karma points
    Oct 24, 2017 @ 21:20
    Anders Brohäll
    0

    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
    Daryl
    0

    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 46 posts 175 karma points
    Nov 08, 2017 @ 14:01
    David Parr
    0

    Hi Daryl,

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

    Thanks

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

    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
    0
  • Nicola Ayan 6 posts 75 karma points
    Feb 21, 2018 @ 11:52
    Nicola Ayan
    0

    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: https://blog.nicolaayan.com/2018/02/how-to-use-unity-in-an-umbraco-solution/

Please Sign in or register to post replies

Write your reply to:

Draft