plugin has encountered an error and cannot be rendered
-
When I try to view or edit a Lazy block, it doesn’t show the block set up, “The ‘lazy-blocks-block-builder’ plugin has encountered an error and cannot be rendered” . The rendered blocks show up OK on the public site.
In devtools, I see “Error: Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.” (Not sure if that comes from LazyBlocks. I see the “_load_textdomain_just_in_time” error in my logs, but that is just a PHP notice so I don;t think it is relevant.
I can create new blocks and edit them! Huh? (doesn’t seem to be this URL problem: https://wordpress.org/support/topic/error-this-block-has-caused-an-error-and-cannot-be-previewed/ since my new blocks have the URL field but do work)
This is only a problem with old existing blocks, but I see it is also a problem with the “example block”. My blocks use /blocks/lazyblock-*/block.php
Here’s one exported block that doesn’t let me edit anymore:[
{
"id": 51,
"title": "Team members",
"icon": "<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8z\" \/><\/svg>",
"keywords": [],
"slug": "lazyblock\/team-members",
"description": "",
"category": "text",
"category_label": "text",
"supports": {
"customClassName": true,
"anchor": false,
"html": false,
"multiple": true,
"inserter": true,
"reusable": true,
"lock": true,
"align": [
"wide",
"full"
],
"ghostkit": {
"effects": false,
"position": false,
"spacings": false,
"frame": false,
"transform": false,
"customCSS": false,
"display": false,
"attributes": false
}
},
"controls": {
"control_7e5a0f4eda": {
"type": "rich_text",
"name": "name",
"default": "",
"label": "Name",
"help": "",
"child_of": "",
"placement": "content",
"group": "default",
"width": "100",
"hide_if_not_selected": "true",
"required": "false",
"translate": "false",
"save_in_meta": "false",
"save_in_meta_name": "",
"placeholder": "",
"characters_limit": ""
},
"control_10abb845c5": {
"type": "text",
"name": "title",
"default": "",
"label": "Title",
"help": "",
"child_of": "",
"placement": "content",
"group": "default",
"width": "100",
"hide_if_not_selected": "true",
"required": "false",
"translate": "false",
"save_in_meta": "false",
"save_in_meta_name": "",
"placeholder": "",
"characters_limit": ""
},
"control_8539d14287": {
"type": "image",
"name": "headshot",
"default": "",
"label": "Headshot",
"help": "",
"child_of": "",
"placement": "content",
"group": "default",
"width": "100",
"hide_if_not_selected": "true",
"required": "false",
"translate": "false",
"save_in_meta": "false",
"save_in_meta_name": "",
"insert_from_url": "false",
"preview_size": "medium",
"placeholder": "",
"characters_limit": ""
},
"control_60f9f9496e": {
"type": "classic_editor",
"name": "bio",
"default": "",
"label": "Bio",
"help": "",
"child_of": "",
"placement": "content",
"group": "default",
"width": "100",
"hide_if_not_selected": "true",
"required": "false",
"translate": "false",
"save_in_meta": "false",
"save_in_meta_name": "",
"placeholder": "",
"characters_limit": ""
},
"control_63294141bf": {
"type": "url",
"name": "linkedin",
"default": "",
"label": "Linkedin",
"help": "",
"child_of": "",
"placement": "content",
"group": "default",
"width": "100",
"hide_if_not_selected": "true",
"required": "false",
"translate": "false",
"save_in_meta": "false",
"save_in_meta_name": "",
"placeholder": "",
"characters_limit": ""
}
},
"code": {
"output_method": "template",
"editor_html": "",
"editor_callback": "",
"editor_css": "",
"frontend_html": "<div class=oneteam>\n <div class=team-img><img src='<?=$attributes['headshot']['url'];?>'><\/div>\n <div class=team-name><?=$attributes['name'];?><\/div>\n <div class=team-title><?=$attributes['title'];?><\/div>\n <div class=biowrap>\n <div class=team-text>\n <img src='<?=$attributes['headshot']['url'];?>'>\n <h3><?=$attributes['name'];?><\/h3>\n <h4><?=$attributes['title'];?><\/h4>\n <?=$attributes['bio'];?>\n <\/div>\n <div class=team-link><a href='<?=$attributes['linkedin'];?>'>LinkedIn<\/a><\/div>\n <\/div>\n<\/div> ",
"frontend_callback": "",
"frontend_css": "",
"show_preview": "unselected",
"single_output": true
},
"styles": [],
"condition": []
}
]Lazy version 3.8.3, WP version 6.8
Thanks for your good work 🙂
The topic ‘plugin has encountered an error and cannot be rendered’ is closed to new replies.