I'm looking at the values of galleria variables on a node I have with two galleria sliders, both using option sets with non "classic" custom themes in their optionsets.
No matter what I do, I cannot get the "theme" value or height/width settings to be anything but what is defined in the "Default" option set.
I checked out the galleria_optionsets table, its accurate. It seems that $optionset is not being populated correctly, so it ends up empty, and ends up defaulting to "default" every time.
$options from option_definition function:
Array
(
[grouping] => Array
(
[default] => Array
(
)
)
[galleria_optionset] => Array
(
[default] => default
)
[galleria_theme] => Array
(
[default] => classic
)
)
$options from option_definition function:
Array
(
[grouping] => Array
(
[default] => Array
(
)
)
[galleria_optionset] => Array
(
[default] => default
)
[galleria_theme] => Array
(
[default] => classic
)
)
vars->settings->optionset array from template_preprocess_galleria_container: (blank)
optionset_name from galleria_optionset_load:
default
optionset from galleria_optionset_load:
Array
(
[name] => default
[title] => Default
[theme] => classic_new
[plugins] => Array
(
)
[imagestyle_thumb] => galleria_thumb
[imagestyle_normal] => slideshow_member_lg
[imagestyle_big] =>
[options] => Array
(
[height] => 300
[width] => 650
)
)
$options from option_definition function:
Array
(
[grouping] => Array
(
[default] => Array
(
)
)
[galleria_optionset] => Array
(
[default] => default
)
[galleria_theme] => Array
(
[default] => classic
)
)
$options from option_definition function:
Array
(
[grouping] => Array
(
[default] => Array
(
)
)
[galleria_optionset] => Array
(
[default] => default
)
[galleria_theme] => Array
(
[default] => classic
)
)
vars->settings->optionset array from template_preprocess_galleria_container: (blank)
optionset_name from galleria_optionset_load:
default
optionset from galleria_optionset_load:
Array
(
[name] => default
[title] => Default
[theme] => classic_new
[plugins] => Array
(
)
[imagestyle_thumb] => galleria_thumb
[imagestyle_normal] => slideshow_member_lg
[imagestyle_big] =>
[options] => Array
(
[height] => 300
[width] => 650
)
)
Comment | File | Size | Author |
---|---|---|---|
#8 | 1608904-8-galleria-views-optionset-1.patch | 1.1 KB | a.milkovsky |
Comments
Comment #1
rconstantine CreditAttribution: rconstantine commentedI too have this issue. My custom optionset has a much larger footprint than the default, so it is pretty obvious that it isn't being used anymore. I'm not sure what the date was of the version of this module I originally installed, but I did install it many months ago. Just the other day I updated and now I have this issue.
I investigated a little, then got stuck.
I'm not sure what calls "function template_preprocess_galleria_container(&$vars) {" but the $vars variable lists the 'default' optionset as the one to use. So I know it is something upstream from that.
If you can point me to what comes before that - i.e. where the $vars variable gets set, I can investigate further.
Thanks.
Comment #2
bsandor CreditAttribution: bsandor commentedSame issue with 7.x-1.0-beta3 version.
Comment #3
simon.westyn CreditAttribution: simon.westyn commentedI fixed this by adding an extra "if" in galleria/theme/theme.inc.
In the template_preprocess_galleria_container function there is an if:
the problem is that the view doesn't have it's optionset stored in this variable but in
But this doesn't completely solve the problem.. Apartently the width and height were passed as string to the JS instead of integer.
To fix this I added 2 lines of code in the function "galleria_add_js" (galleria.module)
So, to fix this:
change the following if:
to:
and add
in galleria_add_js (galleria.module), above where the $js_settings array is created, like this:
I hope this will solve your problem :)
Comment #3.0
simon.westyn CreditAttribution: simon.westyn commentedadded deets to array dump
Comment #4
bmarcotte CreditAttribution: bmarcotte commentedI'm trying to use galleria from code.
I found that usage of $vars['settings']['optionset']
should be $vars['settings']['option_set']:
the original post was due to my own mistake; comments have been deleted;
Sorry to confuse,
Bob
Comment #5
bmarcotte CreditAttribution: bmarcotte commentedOn a related note, I added a galleria_optionset_load to galleria-container.tpl.php so that the thumbnails would follow the option set settings. Here is the new code.
Bob
Comment #6
tstoecklerSo to me it seems that the views plugin stores the optionset in the wrong keys.
Attached patch fixes this for me. Please note that the views that use the Galleria style need to be re-saved.
Also I think the 'galleria_theme' key seems to be unused as the theme is determined by the optionset. I therefore removed that as well.
Comment #7
a.milkovsky#6 Works for me
Comment #8
a.milkovskyRe-rolled #6
Comment #9
a.milkovskyRestoring status