Skip Navigation

[Resolved] Content Templates Do Not Properly Display Shortcode from Asgaros Forum

This thread is resolved. Here is a description of the problem and solution.

Problem: I'm using the Asgaros Forum plugin to add a forum to my site. Unfortunately it seems that the shortcode does not work completely in a Content Template. The forum is displayed without proper formatting.

Solution: Our team collaborated with the plugin developers and proposed a patch in their github account. It appears to resolve the issue in Content Templates.

Relevant Documentation:
https://github.com/Asgaros/asgaros-forum/issues/228

This support ticket is created 5 years, 6 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.

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 11 replies, has 2 voices.

Last updated by andrewF-6 5 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#1246722
forum format error in tab.png

I am trying to:
Insert the following shortcode [forum forum="2"] for an Asgaros Forum in:
- a Kadence Shortcode Block within a Blocks Content Template
- a Divi Builder Module within a Divi Builder Content Template

Link to a page where the issue can be seen:
Project under construction

I expected to see:
A fully and properly formed Asgaros Forum

Instead, I got:
A forum with all style and formatting stripped out.

Could you please download and install the Asgaros Forum plugin and insert their shortcode in a content template to see if it will work?

#1246799

Looks like their shortcode doesn't work well even without blocks in a legacy Content Template. I'm guessing there is an issue where their assets aren't loaded because the shortcode is not part of the original post's content. Let me escalate this to my 2nd tier support team to get their opinion, this might be a compatiblity issue we can address with their developers.

In the meantime, you can test by placing the forum shortcode directly in some post's content, then place the Post Body in your Content Template for that post, using blocks.

#1246801

Thank you! When the shortcode is used outside of a Content Template it works just fine. The failure occurs only when the shortcode is used within a Content Template.

I have tested with Divi and the Blocks Editor. There seems to be something specific about the Content Template that strips the shortcode output of its formatting...

#1246803

Yes, it definitely has something to do with how the shortcode registers its assets. I can see in their support forum another User was having trouble placing the shortcode in a Kadence block: https://wordpress.org/support/topic/forum-placed-with-shortcode-in-kadence-blocks-tab-loses-all-formatting/

The author explained some details about the technical side of things. Since this data is going in a Content Template and not a pubic-facing post type, it may require some collaboration to get right.

#1246804

Hi Christian!

I have some news!
1. That author of that support post is me - I contacted them prior to Toolset. (:-)
2. When I place the shortcode in the Custom Post text body (and not as part of the Content Template) as per your suggestion, the Shortcode works perfectly!

This issue solely appears when working with Content Templates then!

I hope this helps.

#1247110

Okay thanks, my second tier team has informed me that the way their plugin is written requires that the forum shortcode is placed in the post content. To get around that, we would have to work with their developers. If you'd like to initiate that process, please provide an email address where we can contact them directly. Otherwise, it looks like the workaround is your best option.

#1247281

Dear Christian / Support,

The response provided by the Asgaros Forum plugin team is as follows:

"Hello

If you want you can forward them my official GitHub account which they also can use to contact me about possible compatibility-changes:
hidden link

At the moment the forum relies on putting the forum-shortcode inside of the posts content to ensure that scripts are not loaded on every page (which may be not related to the forum) to increase the overall performance. Some plugins use custom places to store data so its just impossible for me to consider them all because there are millions of plugins out there. However, if the developers of this plugin have a good idea on how to add compatibility with Asgaros Forum, I open for every suggestion. 🙂

Post Link: https://wordpress.org/support/topic/forum-placed-with-shortcode-in-kadence-blocks-tab-loses-all-formatting/#post-11561249

It would seem no email was provided however...

#1247284

Okay thanks, I'll relay this information to the team and see if this is enough for us to collaborate.

#1248141

Okay our team has suggested a compatibility layer here: https://github.com/Asgaros/asgaros-forum/issues/228

We encourage you to push the plugin authors to include this in an upcoming release.

#1248181

Dear Christian,

Many thanks - I have sent this to the developers for their review! I will let you know their feedback ASAP.

Best

#1248243

That's fine. From our perspective, there's nothing else we can do here. Let's close this ticket and you can follow up with the forum developers in their support system.

#1248259

My issue is resolved now. Thank you!