• Resolved Bjarne Oldrup

    (@oldrup)


    Hey! Thank you for creating this fine block for WordPress. It’s just what we need, a simple block for a TOC without countless bells and whistles.

    I’m testing it on a site, running WP 6.4.1 and PHP 8.1, and in the block editor, I get the error Error loading block: Invalid parameter(s): attributes

    Inspecting the error, there are some more hints.

    XHRGET
    https://removed/wp-json/wp/v2/block-renderer/simpletoc/toc?context=edit&attributes[no_title]=false&attributes[title_level]=2&attributes[title_text]=Table of Contents&attributes[use_ol]=false&attributes[remove_indent]=false&attributes[add_smooth]=false&attributes[use_absolute_urls]=false&attributes[max_level]=2&attributes[min_level]=1&attributes[accordion]=false&attributes[wrapper]=false&attributes[bmCSS]=&post_id=2800&_locale=user
    [HTTP/3 400  135ms]
    
    	
    code	"rest_invalid_param"
    message	"Invalid parameter(s): attributes"
    data	Object { status: 400, params: {…}, details: {…} }
    status	400
    params	Object { attributes: "bmCSS is not a valid property of Object." }
    attributes	"bmCSS is not a valid property of Object."
    details	Object { attributes: {…} }
    attributes	Object { code: "rest_additional_properties_forbidden", message: "bmCSS is not a valid property of Object.", data: null }
    code	"rest_additional_properties_forbidden"
    message	"bmCSS is not a valid property of Object."
    data	null

    Any idea what might cause this?

    The fun part is, that the block renders the TOC just fine on the front end ??

    Please let me know if I can do anything to help troubleshooting this issue.
    Bjarne

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Marc Toensing

    (@marcdk)

    Hi, this has nothing to do with SimpleTOC. “bmCSS” is not a SimpleTOC attribute. I don’t know what is causing this. Maybe another plugin?

    You can test SimpleTOC with Wp 6.4 and PHP 8.1 here https://demo.tastewp.com/simpletoc That is the same setup I use myself. Please start by deactivating other plugins.

    Thread Starter Bjarne Oldrup

    (@oldrup)

    You’re right. It was a conflict with the plugin BlockMeister. Once I disabled that, the TOCs rendered perfectly both in the editor and on the front end.

    Thanks again!

    mtoensing

    (@mtoensing)

    Greta to hear! it would be cool if you inform the developers about this from the plugin

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error loading block: Invalid parameter(s): attributes’ is closed to new replies.