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

Most recent version breaks breadcrumb rendering... #67

Closed markchipman closed 4 years ago

markchipman commented 4 years ago

I updated my project from using 3.4.0 to 3.5.0 (that being the only change I performed). Everything compiles fine... however I get the following runtime error that throws an error:

image

Not sure what you changed in the last update, but something is awry.

zHaytam commented 4 years ago

This is weird, since route values (the dictionary) contains the key page with value null when you're visiting an action in a controller and not a Razor page, but in your case it doesn't.

Can you tell me when does the exception fire exactly? What are you visiting etc... This can be an easy fix but it would be better to know why it happens first.
Thanks!

manisto commented 4 years ago

I'm having a similar issue, only with areas not being present. It is the only thing we have changed. I'm not using areas, and currently have no need to do so.

firefox_V10WEygvuB

zHaytam commented 4 years ago

Ah, maybe because you don't even enable Blazor pages and Areas that the keys aren't present. I will try a fix asap.

zHaytam commented 4 years ago

I believe it's now fixed in 3.5.1 (NuGet will be available shortly).
If you still see the issue, please re-open.

markchipman commented 4 years ago

Just wanted to let you know that the new fix worked! Thanks for your prompt resolution to the issue 👍