Skip Navigation

[Résolu] [Bug] Adding a post field to the content template disables shortcode parsing

This support ticket is created Il y a 6 années et 8 mois. 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)

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Adrian Il y a 6 années et 8 mois.

Assisté par: Christian Cox.

Auteur
Publications
#645200

I have a post with two fields.

The fields are of type checboxes with several alphabetical characters stored as the potential values for the fields.
The fields are set to only save a value if they have been checked. (nothing crazy here)

I create a content template for this post type and put in the first set of checkboxes like so

<span>[types field="hard-skills" separator="</span><span>"][/types]</span>

If I try to put the second field like so:

<span>[types field="hard-skills" separator="</span><span>"][/types]</span>

all hell breaks loose and all of a sudden all shortcodes on the page stop working. This is a bit of a delicate project so I can't give access to the backend, but I am open to collaborate with support to get this thing sorted out.

#645244

Update:
I meant second field

 <span>[types field="soft-skills" separator="</span><span>"][/types]</span>

But either way it's the same issue. even if I add the field twice.

#645247

Hi, I just ran a quick test locally and I don't see any problems with these shortcodes in a Content Template for a CPT:

<span>[types field="checkboxes-092f16d2" separator="</span><span>"][/types]</span><br />
<span>[types field="more-cbs" separator="</span><span>"][/types]</span><br />

They seem to be working as expected, so I tried the beta plugins to see if that made a difference. It does not, so that leads me to believe something else is going on. Please remove the first checkboxes field, and place the second checkboxes field. Is the problem specific to the second checkboxes field, or does it only return when both checkbox fields are placed together?

Also, is it possible that this content is nested inside a conditional block that contains a large amount of other content?

#645392

I know, It does not make any sense, something must have gone wrong at some point with the beta. Just trying to figure out what would cause all shortcodes on the page to break. I would upload an image so you can see I am not making this up.

Found the issue. Had to do with the line breaks. I removed the line breaks around that area and that seems to have fixed it.
I think there are some issues with encoding, since I have seen those sometimes cause random issues like that related to spacing.

I am inclined to believe this problem is somehow related to the issue where views turns HTML comments into paragraphs. https://toolset.com/forums/topic/bug-views-replaces-comments-with-paragraphs/

I also spent more than 100 hours working with a very specialized instance of the beta plugin. It's not like I dropped in TwentySeventeen with only types and I'm 5 minutes in. Since I started the projects there were several updates to the beta versions I was using.

I'm not expecting this to work without a glitch and I am very pleased with the support I have received so far using the beta. I'm hoping my experiences will help you spot fringe issues that would not occur on standard environments, because at the end of the day, toolset is not for those looking to run a simple blog using the default theme. 🙂