Closed Kirillbzp closed 9 months ago
I would assume this is related to caching. v.1.10.2 added a new feature to clase the navigation on mobile devices which added new sidebar specific functions to blazor.bootstrap.js
https://github.com/vikramlearning/blazorbootstrap/commit/75c4b816d1b2b9239ead291f7a3b507b414beb89
Try clearing your cache after upgrading.
@Kirillbzp Please upgrade to the latest version. If you still encounter the issue, let us know or create a new issue.
I have a similar, but not identical problem with one project.
Could not find 'window.blazorBootstrap.sidebar.windowSize' ('blazorBootstrap' was undefined).
I've tried this from version 1.10.1 through to 1.11.1. It works fine on 1.10.1 but not on any of the others. I think the change in 1.10.2 is also contributing here.
Marvin mentioned clearing a cache after upgrading, which cache was he referring to?
Also worth noting is that this is only happening on one project, I have at least five others that are behaving correctly, so I think it is an environmental issue, not anything else. If you can give me any pointers as to what I can look for in my environment to correct, I would be grateful.
Cheers, Dan
@powertec-dan
Check in your browser dev tools the blazor.bootstrap.js
file. It should look like this:
If it does not contain this segment. Try clearing the cache of the website within the dev tools. Or depending on your browser you can open https://your_address/_content/Blazor.Bootstrap/blazor.bootstrap.js
and press CTRL
+SHIFT
+R
at the same time.
Ok, excellent. Thank you for the advice.
If anyone else is struggling with this, my problem was because during the migration of code from one project to another, the launchSettings.json file was omitted. This in turn meant that the _content folder was not published.
Apologise for taking your time with such a fundamental issue, but hopefully leaving this here might help someone in the future.
Describe the bug After updating to 1.10.2 Sidebar stopped working. Immediately when the application is launched and Sidebar is rendered, an exception with the text "Could not find 'window.blazorBootstrap.sidebar.initialize' ('sidebar' was undefined)." is thrown. All versions after 1.10.2 have this bug. After downgrading to 1.10.1 the error disappears
Screenshots
Versions (please complete the following information):
Sample code
Desktop (please complete the following information):