Skip Navigation

[Resolved] Youtube in conditional block

This support ticket is created 3 years, 11 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
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)

This topic contains 4 replies, has 2 voices.

Last updated by Puntorosso 3 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1935625

I have noticed that when I insert a Toolset Youtube block in a Conditional Block, the visual representation is just a thin line, instead of the full block

hidden link

#1937181
Screen Shot 2021-02-07 at 4.49.43 PM.png

Hi, I did a quick test to try to see this problem on my local site and I wasn't able to replicate it in a simple scenario. I'm attaching a screenshot here showing the results when I place a Toolset Youtube Video block inside a conditional block. In this scenario, the YouTube video uses a static URL (not a dynamic source) and the conditional evaluates as being "true".

Can you explain more about your setup?
- Where is the YT block inserted?
- What are the conditions applied to the conditional block?
- Is the video source static or dynamic? If it's dynamic, what is the source of the video?
- Does the video appear on the front-end of the site as expected when the conditional evaluates as true?

#1937227

Sorry I wasn't precise enough in my first ticket.
The YouTube block URL is dynamic, from a "YT URL" custom field.
When building a Custom Template, if the "YT URL" field of the post you select as "View with" is empty, you get this behavior.

While technically seen may be correct (there's no video to show), it makes difficult to select the block, to move or change its parameters.

It would be better if it would show a "dummy" image or at least an empty rectangle.

#1937285
Screen Shot 2021-02-07 at 6.32.06 PM.png

Okay I see, thanks for the additional information. I will ask my 2nd tier team to take a look at this, because the behavior is a bit inconsistent depending on the type of block you insert in the Block Editor. For example,
- A Single Field Block with a blank dynamic source displays "The selected field has no value".
- An Image Field Block with a blank dynamic source displays "This dynamic source returned no content" and the dynamic source fields.
- An Image Slider Block with a blank dynamic source displays no message, but displays the dynamic source fields.
- A YouTube Block with a blank dynamic source displays no message and no dynamic source fields.
It seems there should be some consistency in how these are handled. I'll get some feedback for you.

While technically seen may be correct (there's no video to show), it makes difficult to select the block, to move or change its parameters.
I wanted to mention that I usually find it easiest and fastest to use the Block Navigation menu to select blocks in the editor. Are you aware of this feature? Screenshot here.

#1937363

Sure! I use it also that way.
Just wanted to mention the graphic UI problem because, at first sight, you won't be aware that a YouTube module has been inserted.
Thanks for reporting to your devs.