- 🇨🇦Canada darkodev
The three patch combo does not work for me, and seemingly stopped working for @liquidcms.
Using this patch, https://www.drupal.org/project/drupal/issues/2916876#comment-14279293 ✨ Add visibility control conditions to blocks within Layout Builder Needs work , conditions can be added to Layout Builder blocks. When this module's form is rendered in Layout Builder rather than the block visibility form it fails with console error, "Failed to load resource: the server responded with a status of 500," trying to get "/layout_builder/visibility/block/overrides/node.100001/0/c358233a-6944-4402-8967-12476549051d?region=second&destination=/node/100001/layout&_wrapper_format=drupal_dialog.off_canvas&ajax_form=1&_wrapper_format=drupal_ajax"
Watchdog says, "RuntimeException: The subform and parent form must contain the #parents property, which must be an array. Try calling this method from a #process callback instead."
Patch core with the above patch
Enable this module and Layout Builder
Add a block to a Layout Builder layout (won't work with existing blocks)
Click "Control Visibility" in the Contextual links
Choose "Content Field" and click "Add Condition"
Choose a Bundle
Result is the console error mentioned above.
I haven't found another condition plugin that uses AJAX to populate a second field, so not sure it's even possible. The condition plugins in core load all the options from the outset, so there are no examples there, either.
Active
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
The three patch combo does not work for me, and seemingly stopped working for @liquidcms.