PDA

View Full Version : [FIXED] Using function call in config Objects



regine.rosewich
24 Aug 2016, 12:09 AM
I tried to use a function-call in a config object of a component an could not do it as expected.

To reproduce the bug you have to do the following steps.


Create a view-component e.g. a Panel
Change the "title" config from string to object.
Edit the thus created object.
Add a "text" property with a function-call for a function with two string parameters e. g. <AppName>.<module>.<function>('<string1>', '<string2'),
Add a second property e. g. "padding" ....
...


After the title-object has been saved, the quotation marks of the second string parameter for the function call are deleted and the second string parameter is put into a separate line. Thus the whole component throws an error when being created.

Object when being edited:
55008
Object after having been saved:
55009

petr.vecera
25 Aug 2016, 7:47 AM
Thanks for the report! I have opened a bug in our bug tracker.

regine.rosewich
8 Sep 2016, 3:10 AM
Thanks for the report! I have opened a bug in our bug tracker.

The workaround would be to add a processConfig to the Component with "{config.title = {...}; return config}.
That works.

Thus it would be recommendable to add all configs for the component to that processConfig.