Cascading / nesting parameters and using the parameter of a parent element as the value of a child parameter crashes Cornerstone and crashes the front-end with a Server 500 error.
I came across this error whilst setting up a Layout Component
that contains within it a Component
with design configuration settings on it. For example, the Layout Component
is a section banner, which contains a simple heading and graphic device. The graphic device is itself another Component
with design parameters set up to control color and size of the graphic device. For use in a page, I wish to allow the user to add the top level Layout Component
, which has a stripped back set of parameters, just revealing the heading text, and the size and color of the graphic device.
The graphic device uses a parameter with the name of size
, which is set as the font-size of the container within the component like so: {{dc:p:size}}
.
The Layout Component
then also has a parameter to control the size
with the same name.
I then want to set the value of the size
parameter on the graphic device to the parent value of size
, by entering the same dc code: {{dc:p:size}}
.
Saving and reloading this components page then returns this error in Cornerstone:
And if I try to place the parent Layout Component
into a page, it returns a blank page.
This would also apply to advanced component sets of button variations within a public wrapping component, if you were to have a similar control structure for the child elements, with the parent component sending its parameters through.
If I recall correctly, this did work in a previous version of Pro, and the new parameters simply over-wrote any parent parameter values.