Home › Toolset Professional Support › [Assigned] Fields and Text block does not render content and displays an error message
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
This topic contains 8 replies, has 1 voice.
Last updated by dominiqueM-3 1 day, 6 hours ago.
Assisted by: Minesh.
Tell us what you are trying to do?
I want to customize my search results page with Toolset.
What is the link to your site?
hidden link (hidden link is in maintenance mode for not to be indexed).
Hello,
I've customized the search results archive page with Toolset.
In this archive page, there's a loop for displaying the posts returned by the search.
To customize the elements of each post I want to display, I use the Toolset Fields and Text block.
This block no longer displays a preview in the WordPress editor, instead displaying an error message: “This block has encountered an error and cannot be previewed.”
How to solve the problem?
Thanks
Hello. Thank you for contacting the Toolset support.
That is really strange.
Here is a sandbox site and you can auto-login to it using the following link:
- hidden link
Are you able to reproduce the same issue with the above sandbox site? if no:
- Then there must be a conflict beween the theme or plugins you use/
Could you please try to resolve your issue by deactivating all third-party plugins as well as switch to the default theme to check for any possible conflicts with any of the plugins or themes?
- Do you see any difference?
Hello Minesh,
Thank you for your reply.
I can create a search results archive page and add a Toolset Fields and Text block (I tested it very quickly).
On my site, deactivating all plugins (except Toolset Block, Toolset Type, Toolset Access) and activating the Twenty Twenty-Five theme unfortunately doesn't solve the problem.
Best regards
That is really strange.
Can you please try to create another test archive on your site and add "Fields and Text" block and add some test content like "this is test content" and save your archive and check if that works?
That is really strange.
Can you please check with different server in order to confirm that its not the server issue and server is not blocking any request as you already checked with the sandbox site I shared the "Fields and Text" block is working as expected without any issues.
Also, checkboxes issue looks like there is CSS conflict.
I installed a copy of the site locally on my PC (Wamp environment).
Still leaving the other plugins deactivated and using the Twenty Twenty-Five theme.
The same problem appears.
There are a lot of JS errors that appear in my browser's control panel when I edit the template.
You'll find them here: hidden link
For the weird checkbox display, the following css is used:
.components-checkbox-control__input[type=“checkbox”] {
appearance: none;
background: #fff;
border: 1px solid #1e1e1e;
border-radius: 2px;
box-shadow: 0 0 0 #0000;
clear: none;
color: #1e1e1e;
cursor: pointer;
display: inline-block;
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
font-size: 16px;
height: var(--checkbox-input-size);
line-height: normal;
line-height: 0;
margin: 0 4px 0 0;
outline: 0;
padding: 6px 8px;
padding: 0 !important;
text-align: center;
transition: box-shadow .1s linear;
transition: none;
transition: border-color .1s ease-in-out;
vertical-align: top;
width: var(--checkbox-input-size);
}
My browser's development tools say that --checkbox-input-size is not defined.
Well - we will first take care of "Fields and Text" block for that this ticket is created and that is the original issue.
I would like to know - is your "Fields and Text" block was empty or you have added any content to it? Have you added any third-party shrotcode?
And on different server - have you try to create new archive and with that have you been able to add "Fields and Text" block with any static content?
Minesh,
On the local installation (to check whether the server is at fault), I created an archive template in Toolset for testing purposes, in which I added a Fields and Text block.
I couldn't add any content to the Fields and Text block because the error message was displayed immediately after inserting the block.
For the online site, yes there is content (I hope it's still there), in the Fields and Text block. But now I can't see.
As I've disabled all plugins and am using a default theme, I think any third-party shortcodes are disabled.
In Toolset/Settings/Custom codes there's a shortcode that I've also disabled.
It contains the following code:
add_shortcode('wpv-show-date', 'func_display_locale_date' );
function func_display_locale_date() {
global $post;
return date_i18n('d F Y',strtotime($post->post_date));
}
That is really strange as I do not able to reproduce the issue with the brand new sandbox site I shared and you also confirm that its working with that.
Can you please share admin access details and problem URL of the archive and let me check whats going wrong with your setup.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
As I shared I do not able to reproduce the issue with the sandbox site I shared:
=> https://toolset.com/forums/topic/fields-and-text-block-does-not-render-content-and-displays-an-error-message/#post-2802570
What if you try to setup a brand new site on different server and check with that if you able to see the "Fields and Text" block working?
Hello Minesh,
You're right, the Fields and Text block works on your sandbox.
It also works on the other sites for which I've installed the Toolset plugins.
However, it doesn't solve my problem for the site for which I opened the ticket.
The block worked for a long time.
Is it possible to install an earlier version?
On the copy of the site for which I'm reproducing the problem (https://toolset.com/forums/topic/fields-and-text-block-does-not-render-content-and-displays-an-error-message/#post-2802621), I reinstalled WordPress via the reinstall button on the update page (wp-admin/update-core.php).
That didn't solve the problem, but I got another error in the browser console that I didn't get before:
---
Block validation: Block validation failed for `toolset-blocks/fields-and-text` (
Object { name: “toolset-blocks/fields-and-text”, icon: {...}, keywords: (3) [...], attributes: {...}, providesContext: {}, usesContext: [], selectors: {}, supports: {...}, styles: [], blockHooks: {}, ... }
__experimentalLabel: function __experimentalLabel(attributes)
attributes: Object { content: {...}, style: {...}, container: {...}, ... }
blockHooks: Object { }
category: “toolset”
deprecated: Array [ {...} ]
description: “Allows to display standard and custom fields, combined with text and styling. This block allows to display several fields in the same element.”
edit: class WithSelect(WithPostPreview(WithTranslatedContent(WithDisplayByMediaDevice(v)))) {}
example: Object { attributes: {...} }
icon: Object { src: {...} }
keywords: Array(3) [ “html”, “text”, “toolset” ]
name: “toolset-blocks/fields-and-text”
providesContext: Object { }
save: function c()
selectors: Object { }
styles: Array []
supports: Object { html: false, className: false, customClassName: false }
title: “Fields and Text”
usesContext: Array []
variations: Array []
<prototype>: Object { … }
).
Content generated by `save` function:
<div class=“tb-fields-and-text” data-toolset-blocks-fields-and-text=“1”></div>
Content retrieved from post body:
blocks.js:11937:43
---
Hope this gets you started.
No - that error is becaure the "Fields and Text" block is already available on your archive and its trying to validate it.
Something is broken on your install and it's really hard to check for the issue that is not reproduced on other sites or even on my local installation or sandbox site.
There must be somethig corrupted on your install or something is missing.
And what about installing an old version of the block.
I can't find old versions of Toolset Blocks in Toolset site.