Hi guys! A request from building sites through the 2.4 abilities. The validator already does a great job on element names and setting keys (unregistered keys are rejected with a helpful “did you mean”). There’s one family of mistakes it lets through silently, and those cost us the most time, because everything “succeeds” and the problem only shows up on the frontend.
Environment: Bricks 2.4.4, bricks/set-page-elements.
This single call returns changed: true with no warnings at all:
[
{"id":"t00001","name":"text-basic","settings":{
"text":"{post_titel}",
"_conditions":[[{"key":"{acf_missing_field}","compare":"!=","value":""}]]}},
{"id":"t00002","name":"block","settings":{
"hasLoop":true,"query":{"objectType":"acfRepeaterNotThere"}}}
]
What each one does on the frontend:
{post_titel}: an unknown tag is printed raw. An unknown modifier is dropped silently instead._conditionswith the tag inkey: the correct shape is"key":"dynamic_data","dynamic_data":"{acf_…}". The wrong shape means the condition is always true, so the element shows when it shouldn’t.- An unknown
objectType: the loop renders zero items with no hint why. This is very easy to hit with ACF repeaters.
bricks/preview-dynamic-tag and bricks/list-query-loop-types exist and are great, but an agent has to know to call them for every tag. A warnings array on the write response would catch these at the moment they’re made, without blocking the write:
"warnings": [
{"elementId":"t00001","setting":"text","code":"unknown_dynamic_tag","value":"{post_titel}"},
{"elementId":"t00001","setting":"_conditions[0][0].key","code":"condition_key_looks_like_tag"},
{"elementId":"t00002","setting":"query.objectType","code":"unknown_object_type","value":"acfRepeaterNotThere"}
]
Same idea for update-element, add-element and the HTML/CSS import. The import already keeps {post_title} tags, which is great, but it could flag unknown ones.