Skip Navigation

[Resolved] Types shortcodes being displayed in some cases instead of the values

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

Problem:
On some posts Types shortcodes are being printed instead of parsed.

Solution:
There was a conflict with the "Share Buttons by AddThis" plugin, which the client was happy to remove because of other issues.

This support ticket is created 5 years, 9 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
- 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+01:00)

This topic contains 9 replies, has 2 voices.

Last updated by Guilherme Sampaio 5 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#955688

I am trying to:
Display some fields of a Obra/Projeto post_types using Content Model with Visual Editor.

Link to a page where the issue can be seen:
hidden link

I expected to see:
The values of the fields.

Instead, I got:
Some display the values and some display the shortcodes. :/

Wrong: hidden link
Correct: hidden link

#956353

Nigel
Supporter

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

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

Hi Guilherme

I can see the problem but from the front end I can't see how the pages are built to understand why.

Could I get access to your site to take a look? Then if I need to I can take a copy for further testing at the same time.

I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site, even though I don't intend to make any changes (other than possibly to temporarily add a backup plugin to take a snapshot of the site).

#956572

Nigel
Supporter

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

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

Do you have some kind of protection on the wp-admin page? It redirects to the home page.

#956609

Yes, please click on "Entrar" on the menu or access wp-login.php directly.

#957228

Nigel
Supporter

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

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

Thanks, I was able to sign in.

Once signed in, though, whenever I try to view posts on the front end I'm redirected to my BuddyPress profile page, meaning I can't see the links you shared to demonstrate the problem anymore.

I'm taking a copy of your site to install locally so that I can perform some basic debugging, and I'll update you with my findings.

#957233

Nigel
Supporter

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

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

Hi Guilherme

I isolated the problem to the "Share Buttons by AddThis" plugin.

Disabling that plugin means that the problem posts render correctly.

You know your content better than I do.

Knowing this, can you identify anything in the problem posts that is different to the correct posts that might account for the difference?

To be able to tackle a conflict such as this we need to be able to consistently reproduce the issue.

#957351

Hi Nigel,

You are correct, disabling the plugin makes everything work.
I tried to find if the problem was on the content, but i could not find anything.
I will change this plugin, because it already throws so many warnings on the debug.log that could be fixed easily and the developer doesn't care.

Besides the data is showing, the date field still is not formatting:
hidden link

I am trying to find another post that was showing the code to get more info.

Thanks!

#959493

Nigel
Supporter

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

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

I checked and found that Types seems to have a problem outputting date fields in what is the default format for Portuguese, i.e.

j \d\e F \d\e Y >> 30 de julho de 2018

Those escaped d and e characters break the correct output. If you use an alternate without the escaped characters, e.g.

[types field='data-de-lancamento' style='text' format='F j, Y'][/types]

then it seems to work okay.

I've escalated this so that it can be looked at further, and hopefully we will have a fix before too long.

I'll keep you posted.

#970748

Ok, Nigel!

So, kind of resolved the two problems:

1) removing AddThis plugin makes Types display the data, not the shortcode;
2) changing the date format using non escaped chars makes the date display correctly. Types is treating escaped chars as placeholders;

Do i let this open or close it? It's resolved for now.

#971836

Closed this one. If you could help me on another one that i have opened as it's in the same site: https://toolset.com/forums/topic/views-gives-error-trying-to-paginate-results-on-buddypress-profile/

Anyway, thanks!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.