Error: SIDENAV: Option accordion provided type string but ex


Topic: Error: SIDENAV: Option "accordion" provided type "string" but expected type (boolean)

cfo64nc pro premium priority asked 2 weeks ago

Expected behavior Proper Operation of Side Nav Actual behavior Error message stated above Resources (screenshots, code snippets etc.) enter image description here

error message

enter image description here


Dawid Wajszczuk staff answered 2 weeks ago

Hi,

Make sure that our Pro package has been properly installed https://mdbootstrap.com/docs/standard/pro/installation/. If you have added Bootstrap to your project, remove it. Check if there are no typos in path to our files. Then add data-mdb-accordion="true" to your sidenav. Here are two examples with accordion option:
1. https://mdbootstrap.com/snippets/standard/d-wajszczuk/3309791
2.https://mdbootstrap.com/snippets/standard/d-wajszczuk/3309783

Keep coding,
Dawid


cfo64nc pro premium priority answered 2 weeks ago

Don't know if this should matter or not. 127.0.0.1 - - [14/Sep/2021 16:58:30] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [14/Sep/2021 16:58:30] "GET /static/css/mdb.min.css HTTP/1.1" 304 - 127.0.0.1 - - [14/Sep/2021 16:58:30] "GET /static/css/mdb.min.css HTTP/1.1" 304 - 127.0.0.1 - - [14/Sep/2021 16:58:30] "GET /static/js/mdb.min.js HTTP/1.1" 304 - 127.0.0.1 - - [14/Sep/2021 16:58:30] "GET /static/js/mdb.min.js HTTP/1.1" 304 - 127.0.0.1 - - [14/Sep/2021 16:58:30] "GET /static/plugins/js/all.min.js HTTP/1.1" 304 - 127.0.0.1 - - [14/Sep/2021 16:58:30] "GET /static/plugins/js/all.min.js HTTP/1.1" 304 - 127.0.0.1 - - [14/Sep/2021 16:58:36] "GET /static/js/mdb.min.js.map HTTP/1.1" 200 - 127.0.0.1 - - [14/Sep/2021 16:58:36] "GET /static/plugins/js/wysiwyg.min.js.map HTTP/1.1"

from my flask debug log.


Dawid Wajszczuk staff commented 2 weeks ago

If you are using Flask with Jinja, you probably provide "true" with this Jinja syntax. Doing so, it probably will be "True" with uppercase and this is where the problem is. Because for type boolean it needs to be "true" with lowercase. If this doesn't solve your issue, I won't be able to help you without a piece of your code resposible for this sidenav.


cfo64nc pro premium priority commented 2 weeks ago

Thanks Dawid for your help. I appreciate you. I ended up reinstalling mdb from tar.gz

Here's my jinja2 html template (so far...) https://mdbootstrap.com/snippets/standard/cfo64nc/3312667/


Dawid Wajszczuk staff commented a week ago

Does the problem still occur? I have taken a quick look at your code and it seems fine.


cfo64nc pro premium priority commented a week ago

No, like I said, it's working after I deleted/restored mdb, not sure how it became corrupt or whatever the problem was. Thanks again.


Dawid Wajszczuk staff commented a week ago

I'm glad that it is working fine now. Sometimes it is hard to catch error ;)


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: IMac (Retina 5K, 27-inch, Late 2
  • Browser: Safari
  • OS: MAC OS 10.14.6 Mojave
  • Provided sample code: No
  • Provided link: No