Skip Navigation

[Résolu] [wpv-autop] shortcode fix still has problem with text and images

This support ticket is created Il y a 4 années et 2 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.

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+01:00)

Marqué : 

This topic contains 8 réponses, has 2 voix.

Last updated by martinE-4 Il y a 4 années et 1 mois.

Assisted by: Nigel.

Auteur
Publications
#1517135
2020-02-19 12h21m.jpg

I have been using the [wpv-autop] shortcode fix to display my WYSIWYG custom fields and while the paragraph divisions show up, there is a problem with the display of images (see pic enclosed where I highlight the problem in red). When an image is formatted in the WYSIWYG editor as no wrap for the text, that is ignored. (the text should appear after the image not beside it).

Is there any timeline on the permanent fix? It is not great to have to display custom WYSIWYG fields with the Fields and Text Block and this shortcode fix.

[note as a minor note, on the Toolset home page created with the new Blocks editor, I see that there is no padding when the page is shrunk for mobile - since responsiveness is now possible in Blocks, I think a 10px left and right padding should exist on the home page for mobile]

#1517883

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

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

Screenshot 2020-02-20 at 08.05.57.png
Screenshot 2020-02-20 at 08.04.14.png

I just tested this locally and the image alignment works correctly on my site.

The screenshots show a WYSIWYG field displayed on the front end using a Fields and Text block with the wpv-autop shortcode.

Are you using the current plugin versions? I don't see any debug info.

The permanent fix has been raised in priority; it's an old issue but with the shift to blocks is becoming more prominent and so it has been added to the board for upcoming fixes, but I can't be any more precise than "soon-ish".

#1519125

Here is the text (html) contained in the Wysiwyg custom field around the point where the two center aligned images have wrapped text beside them as in the pic above:

Works by Nani Bell Gonawabi, Lindsey Bond, Liam Coo, Shifra Cooper, Iehente Foote, Alana Forslund, Braiden Houle, Kelty Jean, Aaron Leon, Jackie Omstead, Jamie Oshkabewisens, Adrienne Marcus Raja, Nikki Shaffeeullah, Arie van de Ven and many more were on display at the launch. 375 photos from 21 different travellers!
<blockquote>
<p dir="ltr" lang="en"><a href="<em><u>hidden link</u></em>">#TERRAINofTHOUGHT</a>, 375 photos from 21 <a href="<em><u>hidden link</u></em>" target="_blank" rel="noopener">#TofTCanada</a> travellers! Prints thnx 2 <a href="<em><u>hidden link</u></em>" target="_blank" rel="noopener">@ArtifactUprsng</a>! <a href="<em><u>hidden link</u></em>"><em><u>hidden link</u></em>; <a href="<em><u>hidden link</u></em>" target="_blank" rel="noopener">pic.twitter.com/EjExf9Yrn7</a></p>
— Jumblies Theatre (@jumbliestheatre) <a href="<em><u>hidden link</u></em>" target="_blank" rel="noopener">April 27, 2016</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

<img class="aligncenter" src="<em><u>hidden link</u></em>" alt="" width="584" height="587" />

<img class="aligncenter" src="<em><u>hidden link</u></em>" alt="" width="520" height="456" />

The night also included a screening of a short documentary about Tracks: 7th Canadian Community Play and Arts Symposium and the Vancouver launch of Train of Thought, produced by the Vancouver Park Board and Vancouver Moving Theatre. Savannah Walling, Artistic Director of Vancouver Moving Theatre, introduced the film.

Watch the documentary below or <a href="<em><u>hidden link</u></em>" target="_blank" rel="noopener">here</a>.

<em><u>hidden link</u></em>

Exploratory questions from the Train of Thought's <a href="<em><u>hidden link</u></em>">About </a>page:
<blockquote><strong>Train of Thought </strong>will ask many questions: What's not on the map? What other forms of mapping are there? How can we see the places where we live through new eyes? What protocols are there of arrival, gathering and departure for the territories we pass through? What place names can we learn and imagine? What stories are important to pass across the country? How can we grieve and celebrate together in the shadow of colonialism? How can community-engaged arts help us enter into these questions?</blockquote>
Other related articles:
<a href="<em><u>hidden link</u></em>" target="_blank" rel="noopener">Train of Thought: Tracking Change</a> - Via Community Arts Council of Vancouver
<a href="<em><u>hidden link</u></em>" target="_blank" rel="noopener">Alt.theatre magazine "Train of Thought Goes Off the Track"</a> - Via Alt.theatre and Ange Loft

<em><u>hidden link</u></em>

Maybe that's where the problem is but I don't see it...

#1520385

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

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

Screenshot 2020-02-21 at 09.29.26.png

I copied and pasted that into my test site and—although it wouldn't find the imgs, naturally—you can see from the placeholders that they are centre-aligned and don't have any wrapping text.

I was doing this directly on a page, so I repeated the test, this time creating a Content Template for some post type and outputting the field via the template, but it also worked as expected.

The problem must lie elsewhere.

I suggest you try a simpler test where you make the WYSIWYG field available to pages, and publish a page where you add just a couple of lines of text and a centre-aligned image to the custom field, and output it on the page using the Fields and Text block to see whether that works.

If it does, then there should be some detail in your previous example that causes it to fail.

If it does not, then there is a site-wide problem, and you should try the usual steps to see if there is a conflict with some other code, i.e. disable all plugins except for Types and Views/Blocks and switch theme to twentytwenty.

#1522043

The problem disappears with a switch to 2020 theme so I am putting in a ticket to GeneratePress. I'll let you know the outcome here. Thanks.

#1525201

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

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

OK, let me know what they say, thanks.

#1525345

Tom at GeneratePress is working on it and I'll get back to you. I sent him my site with duplicator.

#1530221

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

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

OK, let me know what feedback you get.

#1536649

Tom could not find the problem. I fixed it by putting a div around the text that followed to explicitly tell wordpress what was supposed to be happening (ie not wrap on the preceding image).

It's so rare it's not worth any more time. Thanks Nigel.

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