SOLVED: convert-html-css-to-bricks-data still returns a generic permission error without postId, and the schema still marks it optional

Browser: Chrome 152
OS: macOS

Hi guys! Hope you’re all doing well. A small one from me this time, nothing urgent.

A short follow-up to Convert-html-css-to-bricks-data gives a misleading permission error when postId is omitted, marked solved in 2.4 with “the conversion guidance now makes the editable postId requirement explicit for non-administrators”. I re-tested on 2.4.3 and from a caller’s side nothing has changed, so I may be looking in the wrong place for that guidance.

Environment: Bricks 2.4.3, WordPress 7.1.3, through the Abilities API, as a non-administrator account holding bricks_full_access.

bricks/convert-html-css-to-bricks-data
{ "html": "<section><h2>t</h2></section>", "css": "" }

-> ability_invalid_permissions
   (the generic, localized "does not have necessary permission")

With "postId": <any page the user can edit> the same call succeeds. The ability’s input schema still has an empty required list.

An agent working from the schema and the error alone still can’t tell that postId is the missing piece. Either of two small changes would close it: list postId as required (or describe it as required for non-administrators in the schema), or mention postId in the permission error.

Hi @roundedhexagon,

Thanks for following up, you’re right that the error itself still doesn’t explain what’s missing. The earlier change added guidance to the ability and postId descriptions, but left the permission error unchanged.

I’ve added a separate improvement to our to-do list so the error explains that non-administrators need to supply an editable postId. It will remain optional in the schema because administrators can omit it.

We’ll update this thread once that improvement is released.

We’ve addressed this in Bricks 2.4.4, 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.

Confirmed on 2.4.4, thank you! Without postId a non-administrator now gets bricks_invalid_param with “Non-administrators must supply postId for HTML and CSS-only conversion”, and the postId description says the same. Exactly what was needed.