Closed (fixed)
Project:
lightGallery
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2025 at 17:11 UTC
Updated:
18 Dec 2025 at 07:59 UTC
Jump to comment: Most recent
When adding custom settings to the formatter, the moment you add a nested json, you aren't able to save the settings.
You get the error "The custom settings are not a valid JSON object."
When you add the needed nested settings directly to the config file of your view mode, the settings work correctly, but you can't resave the settings in the UI, throwing the same error.
{
"counter": true,
"download": true,
"getCaptionFromTitleOrAlt": false,
"hideScrollbar": true,
"thumbMargin": 8,
"thumbHeight": "92px",
"thumbWidth": 92,
"mobileSettings": {
"controls": false,
"download": false,
"showCloseIcon": true
}
}
custom_settings:
counter: true
download: true
getCaptionFromTitleOrAlt: false
hideScrollbar: true
thumbMargin: 8
thumbHeight: 92px
thumbWidth: 92
mobileSettings:
controls: false
download: false
showCloseIcon: true
Comments
Comment #3
matthijsIssue was caused by the maximum depth setting. I bumped this to 3 and release 2.0.3