OJS 3.2.1: Themes und getOption

Hello there,

I’m testing our child themes in our OJS 3.2.1 installation (parent theme is the default theme). I noticed my custom made Options are saved in the database, but it seems like I could not get them. “getOption” returns “null” or the default value, but not the setting in the database. Has anyone an idea what the problem might be? In the earlier versions of OJS everything is working fine.

Edit:
I think only the first custom option is included in $this in the init function of the Theme. If I var_dump $this, the values of the first custom option is included in _optionValues, but not the other values. If I switch the options, the one which comes first is included, the other ones are not.

Edit 2:
I found the solution. If I use getOption several times, only the first one counts. But I also have to use it at least one time to have alle values in _optionValues. So what I did was to use getOption on my very last option and then get all the other values from _optionValues. I’m pretty sure that is not the best way to do this, but for now it’s working.

Edit 3:
OK, the main problem was, that addOption ist now combined with “FieldText” not with “text”. Once I’ve changed this, getOption was working correctly again.

Kind regards
Daniela