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.
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.
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" ... }
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.
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.
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.
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.
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.
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.
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.
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.
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" ... }
I deleted the Umbraco.Forms assemblies from the bin and now it's working..
Not using Umbraco Forms here...
Any luck on this? Having the same problem here.
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.
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.
Is there any error on App_Data/Logs? Or just the ones on the console?
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.
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.
This solution works for me.
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:
My trees.config:
... 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?
Turns out it was a Structure Map issue in our solution. All good now.
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
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
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.
I have the same issue and I'm also looking for a solution. https://our.umbraco.org/forum/using-umbraco-and-getting-started//89331-unity-and-umbraco-77x
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/
is working on a reply...