Skip Navigation

[Escalated to 2nd Tier] Issue with Toolset blocks inside reusable block

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 9 replies, has 3 voices.

Last updated by Shane 3 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1629385
Image 1.jpg
Image 2.jpg
Image 3.jpg
Image 4.jpg

I am trying to:

Created a CPT with custom attributes

Added standard fields and custom to a post inside a Toolset GRID block

Saved the Grid as a reusable block

Saved ok, but when you edit, the Field block for custom attributes say value not found

If you insert the reusable block it does the same

However, on the front end , the value of the filed shows

Link to a page where the issue can be seen:

hidden link

I expected to see:

Instead, I got:

#1629629

Hello, I'm not able to replicate this issue immediately on my local test site so there must be something I don't quite understand about the setup. Is it possible for me to log in to your site's wp-admin area and see the issue firsthand? I have activated private reply fields so you can share the login securely. The URL seems to indicate this is a test site - may I make changes to the post to trigger some updates here?

#1631103
insert-reusable-block.png
create-reusable-block.png

Okay I see why I was confused. Toolset Blocks also offers a reusable blocks feature, so I was under the impression you were referring to Toolset Blocks' reusable blocks. I was unable to see the problem when using Toolset's reusable blocks. However, you have a custom 3rd-party plugin for creating reusable blocks, and the problem is appearing in these 3rd-party reusable blocks.

I will continue to investigate with the Reusable Blocks plugin to see if there is anything we can do to solve the preview issue in the backend. In the meantime, is the Toolset Blocks reusable blocks system a workable solution in your case, or are there some missing requirements for your site?

I'm attaching a screenshot here showing the menu where you can convert a Toolset Grid block into a reusable block. I'm also attaching a screenshot showing how to add one of these reusable blocks to your Block Editor design. Let me know if you have questions about that.

#1631145

ok Christian I didnt realize Toolset could create reusable blocks I will check it

The plugin just displays the list of all reusable blocks They were created using the standard block editor I will check the blocks form the block editor menu, but think they will have same issue

#1632291

Hi Christian. I read the articles on making Toolset blocks reusable. They are just saved as standard Block Editor reusable blocks which is great.

The issue appears to be when you create a reusable which has multiple individual blocks (This is a pretty standard user case). It all seems to save ok.

If one of the included blocks is using dynamic data from a custom attribute, it seems like the block displays the Field Group and then it is "overlayed".

In all the tests, it seems to display in front ok.

For context, if someone is looking at this, here is the use case.

I have a custom post type called Book. It has several custom attributes and relationships.

We create a reusable block which displays the cover, title, subtitle. authors and blurb that can be easily added to posts and pages.

#1632309

Hi, I think I'm getting closer to understanding why this problem occurs. I was able to replicate the issue in one workflow, but not all workflows. The main difference in the workflows is where/when I edit the reusable block, and the context for displaying the reusable block in the preview screen. If I edit the reusable block from within a post editor screen, the problem is not apparent. Similarly, if I edit the reusable block from within a Toolset Content Template with an appropriate post selected for preview at the top of the editor screen, the problem is again not apparent.

On the other hand, when I edit the reusable block on its own, outside the context of a post or content template, the problem occurs. In other words, I must edit the block alone in the Reusable Block (RB) editor screen to see the issue. To get to the problem screen, I can go to the RB dashboard first, then click one of the RBs in the list. The RB dashboard can be seen at the following URL: hidden link
There's no link to it in the main wp-admin menu unless you have the Reusable Blocks Extended plugin active.

While I was investigating, I learned that the RB dashboard page is still available even if you disable that plugin, it's just not shown in any of the wp-admin menus as far as I can tell. You would have to manually type the URL in the browser to access this page. Anyway, if I edit the RB from this dashboard I can see the problem because there is no post context for the block. The preview has no way to determine which post's custom fields should be displayed in the dynamic fields. There is no way to choose a post context so the field has no obvious value. If you edit the block inside the post editor screen, it is obvious the current post's fields should be displayed. If you edit the block inside a Toolset Content Template in the Blocks Editor, at the top of the page you'll have the opportunity to select a post as the context for the preview. Again, once a post is selected there it's obvious which post's fields should be displayed.

I'm not sure if this is a WP Core issue or a Toolset issue. WP doesn't show a post context selector in the reusable block editor screen so it would seem to be a missing feature in WP. On the other hand, I'm not sure there would be a good reason to show one here in WP Core. Before I ask my 2nd tier support team to look into the issue, can you let me know if you're experiencing the problem elsewhere in wp-admin, or only when editing the RB in the standalone RB editor screen?

#1632399

Same issue occurs when you place a reusable block with a custom attribute on a page or post. It happens on display and if you try and edit the block.

The issue doesn't occur with primary fields like the post title, post content or featured image.

What appears to be getting "overlayed" is the Field Group that the attribute is selected from.

I will try creating a Content Template. I hadn't tried that approach yet.

#1636475

Are you talking about placing the reusable block on a page or post other than the post that contains the custom fields? For example, you want to show the fields from post ABC on Page XYZ? Or are you talking about placing the reusable block on the same post or page that contains the custom fields - fields from post ABC on post ABC?

I'm able to produce the former but not the latter. If it's the latter, please show me a link on your site where I can reproduce the issue. Thank you, and sorry for the back-and-forth while I try to understand the problem.

#1636503

Yes, the firts.

The use case is I have a CPT that is a book. It has standard and custom fields (for example Title and Subtitle)

Each book will have it own page and appear in archives

We also want to be able to add a "section" about a book to other pages, blog posts. This would be a group/container with the cover, title, subtitle, author, blurb, link to the book page etc.

#1637889

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi John,

Christian is currently unavailable today but he will be back tomorrow to continue this thread with you.

Thanks,
Shane