Block error: post_taxs_obj is not a valid property of Object

Your PHP registers a block with 6 attributes.

Your JS registers a block with 10 attributes.

They must match, it is non-negotiable. You can’t claim one thing in PHP then say another in javascript. Your code lied to one of the APIs.

You can either:

  • add the missing attributes to PHP
  • or remove the extra attributes from javascript

Most likely the first one.

As an aside, have you considered using server side registration with a block.json and sidestepping the problem completely? Then your JS registration would only need 3 things, the blocks name and its edit/save components, everything else would be pulled automatically from block.json, and WP would inline all that data and use it automatically. It would even enqueue the frontend and editor scripts for you.