SOLVED: Nestable Slider Custom Options - Invalid JSON

Bricks Version: 1.5.3
Browser: MS Edge Version 105.0.1343.53 (Official build) (64-bit)
OS: Windows 10 Home
URL: https://slyngdev.pdms.ca/

I’m testing a nestable slider with a loop inside and custom options. When I add a simple JSON object to the Custom Options box and load it on the front end I get an error in the dev console that says: “splide.min.js?ver=4.0.6:7 Uncaught Error: [splide] Invalid JSON”.

I saw another forum bug report where Thomas suggested a temporary fix while a patch was released in v1.5:

The problem is that when I look at the slider-nestable.php file I see the line he recommended adding already in the code, but at line 1019:

I’ve also tried the JSON object without quotes around the keys like this and it didn’t work either:

{
type: ‘loop’,
perPage: 3
}

I’ve also tried the JSON inline, like this and it didn’t make a difference:

{type:‘loop’,perPage:3}

Hey chris, JSON requires double quotes. Give it a try!

1 Like

Yes, this worked. Thank you!

image

So basically all strings have to be wrapped with double-quotes and literals (true/false, int) can be written as-is without double quotes?

1 Like

Yep, that’s correct.

1 Like