I realised that the notifications bell on the top does not trigger the notifications sidebar to open, the call it does is the following:
$('#modal-notifications').modal('show')
and it complain that "modal is not a function" I checked to see how bootstrap and jquery as loaded and if jquery is loaded before bootstrap and it does in the spark-bootstrap.js file. The issue I believe was there from the beginning.
Does anyone know what the issue is and why the function is not found?
I didn't mean from the console directly. I meant from wherever you are getting the error. I have zero context for what you are trying to do, when you get an error message, etc.
I explained at the top that this happens when trying to open the notifications sidebar in spark admin. Console logging something will not help. Do you have experience with laravel spark?
Yep sorry it's just too vague. I can't see the error output or stack trace. Trying to console.log from in the code would indicate whether you had access to the object at all from that scope and how it sees the object from there. Do you have JavaScript experience?
You're literally sharing the bare minimum information. One line cut and paste from the source, and a vague error that could be caused for any number of reasons depending on how you went about customizing things. I'm assuming of course that you have run npm run dev on the machine you are getting error from.
I should have posted the fix to this issue a while back but here it is in case anyone comes across it again.
The issue was that the javascript library was loaded as a depedency through npm and also as a cdn link and thus they were conflicting. Issue was resolved once the cdn link to the library was removed