Skip Navigation

[Resolved] ypeError: Cannot read private member #e from an object whose class did not decla

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 7 replies, has 1 voice.

Last updated by Ryan 3 weeks, 5 days ago.

Assisted by: Christopher Amirian.

Author
Posts
#2830598

I am trying to edit an existing (and important) content template for displaying a single custom post-type, but whenever I try to edit the template, I get the following error, and am unable to edit the template. I have disabled all plugins and tested with the Twenty Twenty-Five theme, but the issue persists. The template works properly on the front-end, but cannot edit the template to make any changes. I've spent quite a bit of time customizing this template, and don't want to have to rebuild the template.

Thanks for your help,
~Ryan

TypeError: Cannot read private member #e from an object whose class did not declare it
at get text (hidden link)
at get length (hidden link)
at pR.isEmpty (hidden link)
at save (hidden link)
at hidden link
at 200000 (hidden link)
at hidden link
at hidden link
at hidden link
at Qr (hidden link)

#2830829

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Welcome to Toolset support/ Would you please go to WP Dashboard > Toolset > Content Templates and hover over the template in question and click the Duplicate link?

That should duplicate the template and after that please go to the duplicated page and see if the issue is still there.

If not continue with the duplicated one, if yes, please check if the revisions are available for the content template to go back step by step to know which step was the cause of the issue.

hidden link

Thanks.

#2831009

Hi Christopher,

Unfortunately, duplicating the template results in the same error. There are no revisions available for this template. We haven't edited this template in quite some time (possibly a couple years), so it seems possible that the template "broke" as the result of some software updates, etc. Is there some other way that we can access the template?

#2831192

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Unfortunately, there is nothing I can suggest here. Maybe if you install the Classic Editor plugin, so you will be able to see the code itself to share with us.

Then maybe if we could remove some part of the code to see if it fixes the issue.

Then you will have a small portion to work again.

If not, then you most probably need to recreate the template

#2831813

I tried to install the Classic Editor plugin, and changed all of the Toolset settings to use the Classic Editor, but the template still always tries to open in the Block Editor, so I guess I'll have to recreate the template. Given the apparent instability of these Toolset Content Templates that use the Block Editor, and the complete inability to debug/troubleshoot, or even recover any of my work, I don't think I'll be using Toolset with the Block Editor until these types of issues are resolved. Do you guys have any plans to try to remedy this issue? Thanks.

#2832514

Christopher Amirian
Supporter

Languages: English (English )

Hi,

We will be happy to double-check what might be the problem cause. We do not have unstable block editor but maybe there was a block or something that caused the issue that is outside of the Toolset scope.

Do I have permission to copy your website to our server so I can check with our second-tier support?

Thanks.

#2832741

Hi Christopher,

Thanks for your willingness to escalate to second-tier support to see if the issue can be resolved. I have already rebuilt the content template, but I certainly give permission to copy the website for troubleshooting this issue. The problematic template is titled "Project Single". This is the first time that I've experienced this issue with the block editor. I'm not necessarily blaming Toolset, but it only happens on this particular Content Template, and it still happens even after disabling all other plugins and returning to the Twenty-Twenty Five theme. That said, I'm most concerned that there's essentially no way to troubleshoot the issue, or even access the underlying code to attempt a recovery. As mentioned, I've already rebuilt the template in this case, but it makes me hesitant to use content templates in the future.

Thanks,
~Ryan

#2832918

Christopher Amirian
Supporter

Languages: English (English )

Hi Ryan,

I did some tests and it seems to be related to something like this:

There were Toolset blocks used with the dynamic options to content that is not available anymore for some reason. So it must have been changed or something.

I copied the website to:
hidden link

You can also login with the same user/pass.

What I did was to install the WP Adminer plugin which will give me access to the database.

I knew from the Content template list that the content template in question had the ID of 2049.

I added this SQL Command to search for the content of that post and this was the result:

<!-- /wp:toolset-blocks/conditional --><!-- wp:toolset-blocks/field {"fieldType":"fields","postField":{"label":"Post Content (Body)","value":"post-content","group":"post","categories":["text"],"fields":[]},"postProvider":{"value":"__current_post","label":"Current Project"}} -->
<div class="tb-field" data-toolset-blocks-field="1" data-last-update="1.4">[tb-dynamic provider="__current_post" post="current" source="post-content" force-string='first' ]</div>
<!-- /wp:toolset-blocks/field --><!-- wp:toolset-blocks/conditional {"conditions":{"operator":"AND","conditions":[{"firstArgument":{"source":{"label":"Post data","value":"post"},"value":{"source":"toolset_custom_field|project-meta","field":"houzz-link","customPost":null,"provider":"__current_post","is_repetitive":false},"extra":""},"operator":{"label":"!=","value":"ne"},"secondArgument":{"source":"value","value":""}}],"negative":false},"parsedConditions":"  ( ( $(wpcf-houzz-link) ne '' ) ) "} -->
[wpv-conditional if="  ( ( $(wpcf-houzz-link) ne '' ) ) " ]<!-- wp:toolset-blocks/fields-and-text {"style":{"margin":{"enabled":true},"padding":{"enabled":true,"paddingTop":"20px","paddingBottom":"20px"},"display":true},"editorMode":"html"} -->
<div class="tb-fields-and-text" data-toolset-blocks-fields-and-text="1"><p style="text-align: center;"><a href="[types field='houzz-link' output='raw'][/types]" target="_blank" rel="noopener">See details for this project on Houzz.com</a></p></div>
<!-- /wp:toolset-blocks/fields-and-text -->[/wpv-conditional]
<!-- /wp:toolset-blocks/conditional --><!-- wp:toolset-blocks/grid {"style":{"margin":{"enabled":true,"marginBottom":"80px"},"padding":{"enabled":true}},"columnsTablet":[0.3333333333333333,0.3333333333333333,0.3333333333333333],"columnsDesktop":[0.19333333333333327,0.6233333333333335,0.1833333333333333],"columnGapDesktop":0,"columnGapTablet":0,"wizardDone":true} -->
<div class="wp-block-toolset-blocks-grid tb-grid" data-toolset-blocks-grid="1"><!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]},"verticalAlignment":"center"} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-center" data-toolset-blocks-grid-column="1"><!-- wp:shortcode -->
[is_next]
<!-- /wp:shortcode --></div>
<!-- /wp:toolset-blocks/grid-column --><!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]},"verticalAlignment":"center"} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-center" data-toolset-blocks-grid-column="1"><!-- wp:toolset-blocks/fields-and-text {"editorMode":"html"} -->
<div class="tb-fields-and-text" data-toolset-blocks-fields-and-text="1"><center><a class="project-cat-button" href="/project-group/new-construction/"><img src="/wp-content/uploads/2021/05/project-cat-button-icon.png">New Constr.</a><a class="project-cat-button" href="/project-group/renovation/"><img src="/wp-content/uploads/2021/05/project-cat-button-icon.png">Renovation</a></center></div>
<!-- /wp:toolset-blocks/fields-and-text --></div>
<!-- /wp:toolset-blocks/grid-column --><!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]},"verticalAlignment":"center"} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-center" data-toolset-blocks-grid-column="1"><!-- wp:shortcode -->
[is_prev]
<!-- /wp:shortcode --></div>
<!-- /wp:toolset-blocks/grid-column --></div>
<!-- /wp:toolset-blocks/grid --><!-- wp:toolset-views/view-editor {"style":{"blockAlign":"full"},"reduxStoreId":"views-editor-1685994653108","viewId":2265,"viewSlug":"project-testimonial","previewId":2266,"focused":false,"insertExisting":"0","wizardDone":true,"wizardStep":3} -->
<div class="wp-block-toolset-views-view-editor wpv-gutenberg-view-wrapper-2265"><!-- wp:toolset-views/view-layout-block --><!-- wp:toolset-views/view-template-block {"storeId":"views-editor-1620094805270","style":{"cssClasses":[]}} -->
<div class="wp-block-toolset-views-view-template-block wpv-block-loop-item php-to-be-replaced-with-shortcode" data-toolset-views-view-template-block="1"><!-- wp:toolset-blocks/container {"style":{"background":{"type":"image","solid":{"color":{}},"gradient":{"colors":[{"rgb":{"r":0,"g":0,"b":0,"a":1}},{"rgb":{"r":255,"g":255,"b":255,"a":1}}],"type":"linear"},"image":{"horizontal":{},"vertical":{},"url":"https://wordpress-1055182-5972402.cloudwaysapps.com/wp-content/uploads/2021/03/Master-Bath-Vanity-Revised.jpg","overlayColor":{"rgb":{"r":145,"g":143,"b":135,"a":0.88}},"attachment":"fixed"}},"padding":{"enabled":true,"paddingTop":"100px","paddingLeft":"100px","paddingRight":"100px","paddingBottom":"80px"},"cssClasses":["testimonial-widget"],"minHeight":null,"minHeightUnit":"px","tablet":{"padding":{"enabled":true,"paddingTop":"60px","paddingLeft":"40px","paddingRight":"40px","paddingBottom":"60px"},"margin":{"enabled":true},"display":true},"blockAlign":"full","display":true,"phone":{"padding":{"enabled":true,"paddingLeft":"20px","paddingRight":"20px","paddingTop":"20px","paddingBottom":"20px"},"margin":{"enabled":true},"display":true}},"dynamic":{"backgroundImage":{"isActive":true,"provider":"__current_post","source":"toolset_custom_field|testimonial-meta","field":"background-image"}},"backgroundImage":"https://wordpress-1055182-5972402.cloudwaysapps.com/wp-content/uploads/2021/06/image.png","inner":{"width":1400,"widthUnit":"px"}} -->
<div class="wp-block-toolset-blocks-container tb-container tb-container-parallax testimonial-widget" data-toolset-blocks-container="1" data-bg="[tb-dynamic provider='__current_post' post='current' source='toolset_custom_field|testimonial-meta' field='background-image' force-string='first' ]"><div class="tb-container-inner"><!-- wp:toolset-blocks/grid {"style":{"margin":{"enabled":false},"padding":{"enabled":false,"paddingLeft":"60px","paddingRight":"60px"},"tablet":{"padding":{"enabled":false,"paddingRight":"30px","paddingLeft":"30px"},"margin":{"enabled":false}}},"columnsTablet":[1],"columnsDesktop":[0.3599999999999999,0.6400000000000001],"wizardDone":true} -->
<div class="wp-block-toolset-blocks-grid tb-grid" data-toolset-blocks-grid="1"><!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]},"verticalAlignment":"center"} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-center" data-toolset-blocks-grid-column="1"><!-- wp:toolset-blocks/image {"style":{"cssClasses":["testimonial-image"],"display":true,"tablet":{"display":"none"},"phone":{"display":"none"}},"dynamic":{"url":{"isActive":true,"provider":"__current_post","source":"media-featured-image-data"}},"url":"<em><u>hidden link</u></em>","urlSizeSlug":"medium","captionStyle":{"bold":false,"italic":false,"strikethrough":false},"id":2363,"lightbox":{"enabled":false,"group":null},"hover":{}} -->
[tb-dynamic-container provider='__current_post' source='media-featured-image-data' field='' removeDeadLinkTarget="true"]<figure class="wp-block-image tb-image tb-image-dynamic tb-image-frame-none testimonial-image" data-toolset-blocks-image="1"><img src="[tb-dynamic provider='__current_post' post='current' source='media-featured-image-data' size='medium' force-string='first' ]" alt="%%tb-image-alt-text%%" class="%%tb-image-wp-image-class%%"/></figure>[/tb-dynamic-container]
<!-- /wp:toolset-blocks/image --></div>
<!-- /wp:toolset-blocks/grid-column --><!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]},"verticalAlignment":"center"} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-center" data-toolset-blocks-grid-column="1"><!-- wp:toolset-blocks/fields-and-text {"style":{"fontSize":17,"lineHeight":1.5,"lineHeightUnit":"rem","textColor":{"r":245,"g":245,"b":245,"a":1},"display":true},"editorMode":"html"} -->
<div class="tb-fields-and-text" data-toolset-blocks-fields-and-text="1"><blockquote>
  [wpv-post-body view_template="None"]
  <cite>—[wpv-conditional if="( $(wpcf-testimonial-link) ne '' )"]<a href="[types field='testimonial-link' output='raw'][/types]">[/wpv-conditional][wpv-post-title][wpv-conditional if="( $(wpcf-testimonial-link) ne '' )"]</a>[/wpv-conditional]</cite></blockquote></div>
<!-- /wp:toolset-blocks/fields-and-text --></div>
<!-- /wp:toolset-blocks/grid-column --></div>
<!-- /wp:toolset-blocks/grid --></div></div>
<!-- /wp:toolset-blocks/container --></div>
<!-- /wp:toolset-views/view-template-block --><!-- /wp:toolset-views/view-layout-block --></div>
<!-- /wp:toolset-views/view-editor -->

Then, I tidy up the code to remove the dynamic content from the Toolset blocks and gave a raw content. Here is the result:

<!-- wp:toolset-blocks/grid {"style":{"margin":{"enabled":true,"marginBottom":"40px"},"padding":{"enabled":true},"id":"","cssClasses":[],"tablet":{"padding":{"enabled":true},"margin":{"enabled":true,"marginBottom":"10px"}}},"columnsDesktop":[0.16329999999999997,0.6783000000000002,0.1583],"wizardDone":true} -->
<div class="wp-block-toolset-blocks-grid tb-grid" data-toolset-blocks-grid="1"><!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]}} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top" data-toolset-blocks-grid-column="1"><!-- wp:shortcode -->
[is_next]
<!-- /wp:shortcode --></div>
<!-- /wp:toolset-blocks/grid-column --><!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]}} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top" data-toolset-blocks-grid-column="1"><!-- wp:toolset-blocks/fields-and-text -->
<div class="tb-fields-and-text" data-toolset-blocks-fields-and-text="1"><h2 style="text-align: center;">Portfolio: [wpv-post-taxonomy type="project-group"]</h2></div>
<!-- /wp:toolset-blocks/fields-and-text --><!-- wp:toolset-blocks/heading {"style":{"fontSize":12,"fontWeight":"bold","letterSpacing":1,"textColor":{"r":116,"g":116,"b":116,"a":1},"textTransform":"uppercase","textAlign":"center","display":true},"dynamic":{"content":{"isActive":true,"provider":"__current_post","source":"post-title"}},"level":1} -->
[tb-dynamic-container provider='__current_post' source='post-title' field='']<h1 class="tb-heading has-text-color" data-toolset-blocks-heading="1" data-last-update="1.4">[tb-dynamic provider='__current_post' post='current' source='post-title' force-string='first' ]</h1>[/tb-dynamic-container]
<!-- /wp:toolset-blocks/heading --></div>
<!-- /wp:toolset-blocks/grid-column --><!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]}} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top" data-toolset-blocks-grid-column="1"><!-- wp:shortcode -->
[is_prev]
<!-- /wp:shortcode --></div>
<!-- /wp:toolset-blocks/grid-column --></div>
<!-- /wp:toolset-blocks/grid -->

<!-- wp:toolset-blocks/conditional {"conditions":{"operator":"AND","conditions":[{"firstArgument":{"source":{"label":"Post data","value":"post"},"value":{"source":"toolset_custom_field|project-meta","field":"video-banner","customPost":null,"provider":"__current_post","is_repetitive":false,"is_created_by_types":true},"extra":""},"operator":{"label":"Empty value","value":"empty"},"secondArgument":{"source":"value","value":""}}],"negative":true},"parsedConditions":" NOT ( empty( $(wpcf-video-banner)) ) "} -->
[wpv-conditional if=" NOT ( empty( $(wpcf-video-banner)) ) " ]<!-- wp:toolset-blocks/container {"style":{"margin":{"enabled":false},"padding":{"enabled":false,"paddingTop":"25px","paddingLeft":"25px","paddingRight":"25px","paddingBottom":"25px"},"blockAlign":"full","cssClasses":[],"display":true}} -->
<div class="wp-block-toolset-blocks-container tb-container" data-toolset-blocks-container="1"><!-- wp:toolset-blocks/fields-and-text {"editorMode":"html"} -->
<div class="tb-fields-and-text" data-toolset-blocks-fields-and-text="1"><div class="iframe-container-alt">[types field='video-banner' autoplay='on'][/types]</div></div>
<!-- /wp:toolset-blocks/fields-and-text --></div>
<!-- /wp:toolset-blocks/container -->[/wpv-conditional]
<!-- /wp:toolset-blocks/conditional -->

<!-- wp:toolset-blocks/conditional {"conditions":{"operator":"AND","conditions":[{"firstArgument":{"source":{"label":"Post data","value":"post"},"value":{"source":"toolset_custom_field|project-meta","field":"video-banner","customPost":null,"provider":"__current_post","is_repetitive":false,"is_created_by_types":true},"extra":""},"operator":{"label":"Empty value","value":"empty"},"secondArgument":{"source":"value","value":""}}],"negative":false},"parsedConditions":"  ( empty( $(wpcf-video-banner)) ) "} -->
[wpv-conditional if="  ( empty( $(wpcf-video-banner)) ) " ]
<!-- wp:shortcode -->
[wpv-post-featured-image size="full"]
<!-- /wp:shortcode -->
[/wpv-conditional]
<!-- /wp:toolset-blocks/conditional -->

<!-- wp:toolset-blocks/field {"fieldType":"fields","postField":{"label":"Post Content (Body)","value":"post-content","group":"post","categories":["text"],"fields":[]},"postProvider":{"value":"__current_post","label":"Current Project"}} -->
<div class="tb-field" data-toolset-blocks-field="1" data-last-update="1.4">[tb-dynamic provider="__current_post" post="current" source="post-content" force-string='first' ]</div>
<!-- /wp:toolset-blocks/field -->

<!-- wp:toolset-blocks/conditional {"conditions":{"operator":"AND","conditions":[{"firstArgument":{"source":{"label":"Post data","value":"post"},"value":{"source":"toolset_custom_field|project-meta","field":"houzz-link","customPost":null,"provider":"__current_post","is_repetitive":false},"extra":""},"operator":{"label":"!=","value":"ne"},"secondArgument":{"source":"value","value":""}}],"negative":false},"parsedConditions":"  ( ( $(wpcf-houzz-link) ne '' ) ) "} -->
[wpv-conditional if="  ( ( $(wpcf-houzz-link) ne '' ) ) " ]<!-- wp:toolset-blocks/fields-and-text {"style":{"margin":{"enabled":true},"padding":{"enabled":true,"paddingTop":"20px","paddingBottom":"20px"},"display":true},"editorMode":"html"} -->
<div class="tb-fields-and-text" data-toolset-blocks-fields-and-text="1"><p style="text-align: center;"><a href="[types field='houzz-link' output='raw'][/types]" target="_blank" rel="noopener">See details for this project on Houzz.com</a></p></div>
<!-- /wp:toolset-blocks/fields-and-text -->[/wpv-conditional]
<!-- /wp:toolset-blocks/conditional -->

<!-- wp:toolset-blocks/grid {"style":{"margin":{"enabled":true,"marginBottom":"80px"},"padding":{"enabled":true}},"columnsTablet":[0.3333333333333333,0.3333333333333333,0.3333333333333333],"columnsDesktop":[0.19333333333333327,0.6233333333333335,0.1833333333333333],"columnGapDesktop":0,"columnGapTablet":0,"wizardDone":true} -->
<div class="wp-block-toolset-blocks-grid tb-grid" data-toolset-blocks-grid="1"><!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]},"verticalAlignment":"center"} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-center" data-toolset-blocks-grid-column="1"><!-- wp:shortcode -->
[is_next]
<!-- /wp:shortcode --></div>
<!-- /wp:toolset-blocks/grid-column --><!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]},"verticalAlignment":"center"} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-center" data-toolset-blocks-grid-column="1"><!-- wp:toolset-blocks/fields-and-text {"editorMode":"html"} -->
<div class="tb-fields-and-text" data-toolset-blocks-fields-and-text="1"><center><a class="project-cat-button" href="/project-group/new-construction/"><img src="/wp-content/uploads/2021/05/project-cat-button-icon.png">New Constr.</a><a class="project-cat-button" href="/project-group/renovation/"><img src="/wp-content/uploads/2021/05/project-cat-button-icon.png">Renovation</a></center></div>
<!-- /wp:toolset-blocks/fields-and-text --></div>
<!-- /wp:toolset-blocks/grid-column --><!-- wp:toolset-blocks/grid-column {"style":{"cssClasses":[]},"verticalAlignment":"center"} -->
<div class="wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-center" data-toolset-blocks-grid-column="1"><!-- wp:shortcode -->
[is_prev]
<!-- /wp:shortcode --></div>
<!-- /wp:toolset-blocks/grid-column --></div>
<!-- /wp:toolset-blocks/grid -->

<!-- wp:shortcode -->
[wpv-view name="project-testimonial"]
<!-- /wp:shortcode -->

Then I created a new Content template, clicked the Block editor to go to Gutenberg. From the top right three dot menu selected the Code view. Pasted the changed code.

Saved the page and from the same dotted menu turned back to visual mode.

Now at least it shows the content and you can do edits if you want. The name of the content template is TEST:

hidden link

Unfortunately, it is virtually impossible to avoid such a scenario if the underlying dynamic content is removed. So that is the most we could do at this stage.

Thanks.

#2834588

Hi Christopher,

Thanks for the help. It's good to know that it's *possible* to recover the code using the WP Adminer plugin, but it seems like a pretty complicated solution. However, it seems like there should be a simpler way...

I'm not sure if I totally understand the cause, but would this same thing happen if that same missing dynamic content was present on a standard page or post using the block editor, or only when using the block editor with content templates?

Thanks