Skip Navigation

[Closed] Content Template – Putting Short code in Block editor causes failure

This support ticket is created 4 years, 2 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 8 replies, has 2 voices.

Last updated by Nigel 4 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1778765

I am creating content templates that require two short codes - one for specialized breadcrumbs and one to show an accordion of related posts. If I use the "classic editor," everything works just fine. When I switch to the "block editor," I get the error failure to update. The reason I need to use the block editor is because I also have gutenburg reusable blocks I need to put in the content. I do not see anyway to put gutenburg reusable blocks in the content template with the classic editor.

#1778849

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I'm not sure what the cause of the problem is, but a workaround that might help is to use the excellent Reusable Blocks Extended plugin (https://wordpress.org/plugins/reusable-blocks-extended/).

Amongst its various features is the ability to insert reusable blocks via shortcode, which I think would do what you need.

#1778963
output.PNG
NormalonPage.PNG

I tried that. When I put the reusable-block-extended shortcode into the content template, it strips off the background and formatting from the block. Plus the block is put on the screen after the next shortcode information - even though they are listed in the opposite order in the template.

Here is the template and an image of the output is attached. I also attached an image of what the reusable block looks like when used on a page (not a content template):

[reblex id='181445']
<div id="library" style="display:none;">[wpv-post-taxonomy type="library" format="name"]</div>
[tx-document-breadcrumbs]
<h2 style="text-align:center;">[wpv-post-title]</h2>
[wpv-post-body view_template="None"]

#1779751

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

When you try to use those shortcodes in a template designed with Blocks, how are you inserting them?

Using the Shortcode block?

Maybe you could try adding them to a Classic block (which is like the tinyMCE editor used when editing a Content Template witht the legacy editor).

#1779905

Just tried using the Classic block, and it still gives me Update Failed. The workaround I am using is to use Astra Content Layouts and create the page with those before and after the post content. Then I just use the Toolset Content Template to generate the content portion. It is a pain, but it seems to work. As part of doing finding the workaround, I discovered that the same thing happens when creating Astra Content Layouts - Block Editor + Shortcode = Failed Update. Perhaps it is an Astra issue. Either way, it is super frustrating.

#1780227

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Yes, this may not be caused by Toolset, it could just be that using the shortcodes in a Blocks template reveals the issue.

Dumb question maybe, but have you used these shortcodes on a page edited with the block editor? And they both work as expected?

#1780233

Shortcodes work fine with the Block Editor on pages. I have only had the problem with Content Template and Content Layouts.

#1780235

I have submitted a support ticket with Astra as well.

#1781081

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

One last question, then.

Does the same problem happen with a Content Template edited with Blocks if you switch theme to twentytwenty. Because if that's the case then it seems like a compatibility issue with Astra and the source of those plugins.

If it also fails with twentytwenty theme then I can take a look and see if I can spot why, but the problem may be in the shortcodes rather than with Blocks (or Astra). They are custom shortcodes you've written, or they are registered by some other plugin(s)?

You can share a copy of your site using Duplicator, as described here: hidden link

The topic ‘[Closed] Content Template – Putting Short code in Block editor causes failure’ is closed to new replies.