SOLVED: Prop values not visibile inside builder if inside nestable elements using render_builder()

If any elements are inside nestable elements that use render_builder(), it prevents the elements using the prop values when inside the builder. it just ignores them.

The issue is only happening when the nestable element uses render_builder() and so uses ‘bricks-element-children’ as the way to nest elements in the builder.

No issues on front end, it’s an issue with the vue templates only inside the builder.

Steps to reproduce..

Unfortunately as none of the Bricks native elements use this exact combination of both using render_builder AND being nestable, to reproduce you need to add a custom element that does. Here’s a plugin for a reduced test case, adding one test nestable element which does - GitHub - wplit/nestable-element-bricks · GitHub

  • Create a component out of any elements, add some props, give them values so you can see them in the builder.
  • Now nest those elements inside of the new nestable ‘test element’.
  • You’ll notice the prop values now aren’t used, instead the original content before the prop was added will display.

Video showing it - Props not used inside builder when inside nestable element

Notice when I move the text and gallery inside the element, they immediately show the original ‘text here’ and the shoe images, rather than the correct values from the component prop options.

Moving them back outside of that nestable element, the prop values immediately show without issue.

1 Like

Thanks @wplit ,

Recorded in the bug tracker. We will try to solve it ASAP.

Regards,
Jenn

1 Like

@wplit

As a test/workaround,

Can you please try to amend the bricks-element-children like this.

 <bricks-element-children
				:element="element"
				:loopId="loopId"
				:parentComponent="component || parentComponent"
				:instanceProperties="element?.properties || instanceProperties"
				:instanceId="getInstanceId"
				:directLoopId="directLoopId"
	/>

(It’s not a permanent solution, just a test)

Almost.

Making that change does allow the prop data to be seen in the builder, but only after a builder refresh. A refresh is needed after every changes for it to show up.

The changes are only shown instantly with elements like the text element, which also use render_builder() themselves for outputting inside the builder.

but for any php rendering elements, a builder refresh is required to see the new values. (tested with the gallery element, and also the video element changing the youtube ID with a prop, as well as with other custom elements that don’t have a seperate vue template for inside the builder)

1 Like

We’ve addressed this in Bricks 2.3.1, now available as a one-click update in your WordPress Dashboard.

Please read the changelog entry before updating, and let us know if you experience any issues.

Hey, thanks for pushing it so quickly.

1 Like