Skip Navigation

[Resuelto] Found bug: Can't use apostrophe in conditional taxonomy display

This support ticket is created hace 8 años, 4 meses. 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 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

Etiquetado: 

This topic contains 5 respuestas, has 3 mensajes.

Last updated by Adriano hace 8 años, 3 meses.

Assisted by: Adriano.

Autor
Mensajes
#357941

I have consistently encountered a problem where using an apostrophe in taxonomies breaks the View when there is a conditional output. In a previous thread, I worked around this by using the HTML tax for an apostrophe. However, I have a flat taxonomy that contributors can type in new taxonomies and this issue came up.

Here is the code I use for the taxonomy "sub-genre":

    [wpv-conditional if="( '[wpv-post-taxonomy type="sub-genre" separator="" format="text"]' ne '' )"]Favorite sub-genres: [wpv-post-taxonomy type="sub-genre" format="name"]</em>[/wpv-conditional]

Every time I add a term with an apostrophe, the View breaks for just that post. Once I remove that term, it works again.

However, when I display the taxonomy without the conditional issue, it does not have a problem. This is the code I use to output for that:

Favorite sub-genres: [wpv-post-taxonomy type="sub-genre" format="name"]</em>[/wpv-conditional]

I have searched through the support archive and I see this issue has popped up a few times for people. Can you please look into this to see if it is an easy fix?

#358028

Tom

Hello,

This looks like a bug.

I escalated it to our developers.

Thanks.

#358202

Can I keep this ticket open so I can get an update when this issue is resolved? Thanks!

#359441

Hello,

I’m Adriano, Toolset support lead and I have been escalated to this thread. I’ll give my best to help you to achieve your needs through Toolset components.

Please try to use format="slug" instead (slug isn't a valid attribute value):

[wpv-conditional if="( '[wpv-post-taxonomy type="sub-genre" separator="" format="slug"]' ne '' )"]Favorite sub-genres: [wpv-post-taxonomy type="sub-genre" format="name"]</em>[/wpv-conditional]

Please let me know if you are satisfied with my reply and any other questions you may have.

Regards,

Adriano Ferreira

#362921

Just checking in to see if this bug has been resolved in the core plugin yet. Please update. Thanks!

#363021

You are using a shortcode output to feed attribute values of another shortcode. The outer one has rules about what it can take as those attribute values, and those include quotes (single or double) since the values themselves are wrapped in them. A value containing them closes the value itself, and may break the outter shortcode entirely.

Did you try the solution posted in the previous reply?

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