zHaytam / SmartBreadcrumbs

A utility library for ASP.NET Core (both MVC and Razor Pages) websites to easily add and customize breadcrumbs.
https://blog.zhaytam.com/2018/06/24/asp-net-core-using-smartbreadcrumbs/
MIT License
161 stars 77 forks source link

An unhandled exception occurred while processing the request. ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index #13

Closed bodzilla closed 5 years ago

bodzilla commented 5 years ago

I keep running into this issue:

An unhandled exception occurred while processing the request.
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

I've only set up one breadcrumb which is the home, here's the code:

        [DefaultBreadcrumb("Home")]
        public async Task<IActionResult> Index()
        {
            var user = await _userService.GetByEmailAsync(User.Identity.Name, x => x.Oysters);
            return View(user);
        }

Any help on this? I'm using v1.4

zHaytam commented 5 years ago

Hi, There was a open PR about this bug (.net core 2.2) and I didn't even see it, sorry... Can you confirm that it fixes the bug? (Nuget package version 1.0.4.1).

bodzilla commented 5 years ago

Hi @zHaytam, I don't see the new version up on Nuget yet.

zHaytam commented 5 years ago

It's currently validating.

bodzilla commented 5 years ago

Ok, please let me know when this becomes available :)

zHaytam commented 5 years ago

It's now listed, please check again ^^

bodzilla commented 5 years ago

Works like a charm now, many thanks for the fix and the quick response!