While working on a profile with exported preferences from tiki-admin.php?page=profiles&cookietab=2
I have realized when trying to apply that YAML code as a local profile using the following command:
php console.php profile:apply my-preferences profiles
the result is fatal error:
PHP Fatal error: Unsupported operand types in /var/www/clients/client1/web16/subdirs/.../lib/core/Horde/Yaml/Loader.php on line 363
The problem is my profile YAML file (which I saved as my-preferences.yml
in a profiles/
dir) contains one line preferences like this:
preferences: main_shadow_end: {if $page eq "HomePage"}</div>{/if} main_shadow_start: {if $page eq "HomePage"}<div class="home">{/if} ...
When I change it to the multiline syntax (notice the "|" character and new indented line):
preferences: main_shadow_end: | {if $page eq "HomePage"}</div>{/if} main_shadow_start: | {if $page eq "HomePage"}<div class="home">{/if} ...
then it works with no fatal error anymore!
What can we do to fix this? Fix the YAML exporter somehow to detect if there are any operands like > or < and if yes export the preference value as multiline even when it is just one line of text?
Anything else?
Thanks for your time reviewing this bug.
luci
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |