Topic: Uncaught TypeError: Cannot read property 'hasAttribute' of null of mdb.min.js:19

Albeiro Valencia free asked 3 years ago


jquery-3.6.0.js:4059 Uncaught TypeError: $(...).mdbTreeview is not a function


Dawid Wajszczuk staff commented 3 years ago

Hi. Do you have our Pro Advanced package which is required to use Treeview plugin? Which version of MDB5 do you use? Because there was a bug with Treeview which has been fixed in 3.8.1 release. See the changelog here https://mdbootstrap.com/docs/standard/getting-started/changelog/#v3-8-1. And it would be nice to have a snippet showing this bug https://mdbootstrap.com/snippets/ in order to help you. It is really hard without your code.


neocheck premium commented 2 years ago

Could we have any update about this issue? I'm working in Visual Studio 2022 with .Net 6 and typescript and I got the same problem. I modified some of your files to be sure "document.body" is not null when getting jQuery but another issue appears after this and it's not possible to fix everything (because I have to write in minified files).


Mateusz Lazaru staff commented 2 years ago

@neocheck How to recreate this problem? Could you prepare a snippet with it?


neocheck premium commented 2 years ago

In my case, the problem was I needed to declare the scripts in the head. When I changed them from the head to the bottom of the body before "@RenderSection" the rest of the errors disappeared. By the moment. I didn't get this problem using .Net Core 3.1 with your previous version of MDB pro in others projects.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: Desktop
  • Browser: Chrome
  • OS: windows 10
  • Provided sample code: No
  • Provided link: No
Tags