Skip Navigation

[Resolved] Update to WordPress 5.5.2 from 5.4 broke embedded YouTube videos in custom field

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.

Tagged: 

This topic contains 19 replies, has 3 voices.

Last updated by martinE-4 1 year ago.

Assigned support staff: Nigel.

Author
Posts
#1841379

Nigel
Supporter

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

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

Hi Martin

Sorry for the delay getting back to you, Luo is on vacation and we have a couple of unexpected absences so that we are a little stretched.

I'm taking this into my queue and will handle it. There is quite a bit to digest, so please bear with me while I get up to speed.

#1841483

Hi Nigel! Thanks here is a quick summary:
- this ticket started out after I upgraded my staging site prior to the production site (to wordPress 5.4.3 and latest toolset plugins). Production site was made in Feb 2020 under earlier versions).
- the embedded inline Youtube videos did not survive the update, becoming mere links. Luo tracked that down to them not being on their own lines so that I will manually change them (not too bad to find the posts with them using the Search Regex plugin and then manually change them)
- then I also noticed that some posts had changed their paragraph formatting (eg. hidden link as explained above here...) - at first I thought the [wpv-autop] shortcode had broken but Luo showed that it still works. So apparently, somehow the text in the custom post field "Body" changed by running a previous line break into all 1 line as I indicated above.

I'm just not sure what posts this happened in. I noticed it in another post too - I enclosed screenshots above showing the different ways they displayed (eg. hidden link - just take out the /staging/ to see the production version...)

Clearly this is not a widespread formatting issue but it is concerning without a clear explanation.

Thanks so much for your input, Nigel.

#1842305

Nigel
Supporter

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

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

Screenshot 2020-11-12 at 15.30.50.png

I looked at your staging site, and checked the template for displaying posts, as well as one of the posts themselves (8 documentaries...).

First, let me say that the last update of Blocks fixed some issues with auto-paragraphs, and when I just tested it on my own site it appears to be working correctly. You have used a Fields and Text block to output your post-body custom field, wrapped in wpv-autop tags, but I suggest you simply use the Single Field block in place of the Fields and Text block, and no special handling is required.

I tried that on your staging site, but I could see on the backend preview it wasn't working (I didn't save the changes to the template).

But when I edited the post I could see why.

In the screenshot, note the section of text I'm inspecting.

On your production site there are line breaks within that text, but on the staging site it is continuous.

But when I edited the post I could see that the post-body WYSIWYG field is in HTML mode (rather than Visual), and the relevant text is as follows:

<p>Does this sound familiar? Here's a suggestion for you! Why not check out these documentaries related to art and social change! These documentaries raise some very important questions and, perhaps, will spark some new ideas, thoughts and discussion. Note: This list is in no particular order or preference.   <strong>Searching for Sugar man (2012)</strong></p>

Note how it is all within one set of p tags, hence it is to be expected that the text displays as a single paragraph, nothing broken with the template.

I assume that on the production site if you edit the same post you will find it is different (otherwise where could the line breaks you see come from?).

I don't know why it's different, but that must be the explanation.

#1842361

Thanks Nigel. I appreciate your detailed look at this. I will change to the Single Field block like you suggest if the [wpv-autop] is now unnecessary.

I have noticed the same thing as you that the text is sometimes run within one set of p tags without line breaks that previously existed. (that is what I was trying to explain above lol). I'm wondering what could possibly have caused this in my creation of the staging site from the production site? I think I will try to recreate the staging site with the identical process using Duplicator but before I upgrade WordPress and toolset plugins I will check these particular posts to see if the duplicator process is changing the line breaks or if it is happening at a particular point in the update of WordPress or the plugins. I'll report back.

Thanks again and stay safe in the UK.

#1842871

My issue is resolved now. Thank you!

I wasn't able to reproduce the disappearing line breaks in the same posts that I saw before. I think I will not worry about this anymore. Upgrading WordPress a 2nd time to 5.4.3 did not change any line breaks in my custom fields. Neither did the plugin upgrades. It must have been a one-time random occurrence - that's what backups are for...