Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when page is not found and exception happens #27

Open
JPTouron opened this issue Jun 29, 2017 · 2 comments
Open

Bug when page is not found and exception happens #27

JPTouron opened this issue Jun 29, 2017 · 2 comments

Comments

@JPTouron
Copy link

JPTouron commented Jun 29, 2017

hi, implemented your breadcrumbs take on my site, worked very good, until i reached a page that i hadn't built yet. Didn't care for the exception i got from razor as the page did not exist (ie: The view 'Details' or its master was not found or no view engine supports the searched locations)

The, problem is:
i clicked on the browser's back button, then went into a page that DID exist, and the crumbs where wrong as it was somthing like:
MainPage>NonExistingPage>ExistingPage
then debugging your code i found the issue, you simply load a crumble for every page visited.

So in order to fix this i'd suggest:
1- over BreadCrumbAttribute, you could override OnResultExecuted to check on the result you get, and then do something about it (clear the crumb or not take it in, or whatever)
2- maybe setup some sort of config as to not take some crumbs in specific scenarios (i dont wanna get to a 404 custom error page, click back, click into something else, and have this problem again)

sadly, i don't have time to mix something up to provide as possible solution right now, but maybe sometime next week, any case, try it out, and i hope my suggestions help.

Thanks for your work! it's very good :)

@thelarz
Copy link
Owner

thelarz commented Jun 29, 2017

Thanks. I can check into it if you don't get around to it. But, like you, very busy with other commitments at the moment!

@JPTouron
Copy link
Author

Cool, will wait for the new release :D
If i can get some time i'll fork the project, but i don't think i'll be able to

thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants