Home Forums Weaver Xtreme Theme Youtube Shortcode not working

Topic Resolution: Resolved

This topic contains 23 replies, has 4 voices, and was last updated by  scrambler 6 days, 18 hours ago.

Viewing 16 posts - 1 through 16 (of 24 total)
  • Author
    Posts
  • #50717

    bcslaam
    Participant

    I cant get the youtube shortcode to work. I have checked my syntax multiple times and searched the forum (noticed there have been problems before)

    https://test.free2move.com.au/expanding-reaching-turning/

    1. The top video instance is a test with the vc video element – that works
    2. below it is the wx shortcode – thats not working
    • I have wx shortcode compatibility plugin installed (tried without),
    • I have disabled all plugins, still didnt work, essentials are back on now
    • I tried creating a new page with a standard page template (because this one is a video template) and pasting just the shortcode…nada

    I’m stumped

    #50718

    Weaver
    Keymaster

    I am fairly sure at the moment that this is a WordPress 4.8 and/or 4.8.1 bug. I am continuing to track this down.

    #50720

    scrambler
    Moderator

    I see a working youtube video in the page you linked to so I am confused.

    You also did not give us the exact shortcode syntax you used

    #50722

    bcslaam
    Participant

    As explained in my first post the top video is a visual composer video element underneath it you can see the wx shortcode as text because its not working.

    #50724

    scrambler
    Moderator

    Sorry I missed that.

    @weaver, It appears to work if you put the ID in quotes. Both below work for me

    ID
     [youtube id='FK-A8iidKtM']
    
    URL
     [youtube https://www.youtube.com/watch?v=FK-A8iidKtM ]
    #50725

    bcslaam
    Participant

    mmm weird I just put quotes in and added another test underneath with your second code and neither work for me still.

    Im using the latest version of chrome with cache killer extension on (tried with it off), win 10pro 64bit creators update

    On the first one that uses the id I manually wrapped it in “< c o d e >< / c o d e >” (without the quotes and compressed to normal) but before that, without it, it didnt work anyway.

    #50726

    bcslaam
    Participant

    Just added a 3rd test with no quotes and no html code tags, still nothing

    Ill leave it there til tomorrow, its 2am got to sleep zz

    #50727

    scrambler
    Moderator

    Strange behavior is definitely going on.

    It looks like if you type the shortcode with the editor in TEXT mode AND check the Options “Allow Raw HTML and script”, then it works.

    I tried creating a new test page, switch the content editor to TEXT mode, pasted the two shortcodes above (one with if, one with url), and only the one with the URL worked

    I hen checked the option “allow Raw HTML and script”, and they both worked.

     

    #50728

    Weaver
    Keymaster

    I am getting some of the strangest behavior on my test site that I have ever seen, and it is making no sense.

    Essentially, it seems to be an intermittent issue. Seriously, sometimes it works, and sometimes it doesn’t. I am able to reproduce the problem, but then it goes away. I am suspecting some issue with WP 4.8.

     

    For instance, there is not supposed to be any difference between id=123 vs id=’123′. WP is supposed to strip the quotes. But it isn’t doing that, so when I use an id with quotes, things break. Really unlike anything I’ve seen.

    #50734

    Weaver
    Keymaster

    @scrambler – did you have both shortcodes at the same time? If I just put one, it fails, but both together work. As I said strange behavior.

    #50735

    scrambler
    Moderator

    You are right, this is so very weird.

    [youtube id='FK-A8iidKtM'] 

      With or without quotes, alone, never works

    [youtube https://www.youtube.com/watch?v=FK-A8iidKtM]

      Alone, always work

    [youtube id='FK-A8iidKtM']
    [youtube https://www.youtube.com/watch?v=FK-A8iidKtM]

    Both together, in text mode with “allow raw html and script”, with or without quotes, both  works

    Both together, in text mode without  “allow raw html and script”, with quotes, only the URL works; without quotes, both work.

    #50745

    Gillian
    Moderator

    My YouTube videos inserted with shortcodes using either “youtube” or “weaver_youtube” are still working.

    This is a sample page:

    https://www.poliohealth.org.au/polio-australia-profile-video/

    The shortcode I am using is:

    [youtube id=syJgNuK3BnI percent=85 sd=0 hd=1 related=0 modestbranding=1 autohide=1 showinfo=1 iv_load_policy=3 showsearch=0 theme=light https=0 privacy=1]

    I also created a new test page on that site, using the above shortcode with just the id parameter, and it works fine too.

    [youtube id=syJgNuK3BnI]

    Then I created a test page using the youtube video that bcslaam is having a problem with [youtube id=FK-A8iidKtM], and it also works fine for me.

    Like bcslaam, I’m using the latest version of chrome with cache killer extension on, win 10pro 64bit creators update.

    Note that this site of mine has a full SSL Certificate so I’m wondering if that might be a point of difference (even though I can see that bcslaam’s site indicates it is secure)?

    #50755

    Weaver
    Keymaster

    I grow more and more convinced this is a WP bug. The way it fails for me seems a bit unpredictable. Sometimes the youtube shortcode works, and the vimeo one fails. Then it will seemingly arbitrarily change back. The other shortcodes seems to work okay.

    For me, the most bizarre behavior is that adding just a [youtube] or [vimeo] will make the previously uses work (they leave an error message).

    I can reproduce this issue with the Weaver II Pro versions as well. I can change the name of the failing vimeo/youtube shortcode to something else (weaver_yt for example), and they still will fail.

    And sometimes the handling of id=123 vs id=’123′ changes and I get smart quotes replacing the ‘ instead of the ‘ being stripped as is normal.

    I thought this might be 4.8, but I can duplicate (not always, but often) this behavior as far back as WP 4.6.

    This is one of most bizarre things I’ve ever seen with PHP, WP, and shortcodes. I think it may be connected to TinyMCE and/or the WordPRess the_content() function.

    #50758

    Gillian
    Moderator

    @weaver – your last para might be a hint as to why my videos work okay (at least every time t’ve checked) – I never use Visual mode when editing on my websites (I simply find Text mode easier to use for styling) so perhaps the bug doesn’t get a chance to raise its head?

    #50759

    scrambler
    Moderator

    From my test, if you use text mode AND “Allow Raw HTML and Script” it works

    #50760

    Gillian
    Moderator

    Just confirming that I’m NOT using “Allow Raw HTML and Script” in conjunction with text mode on my sites.

Viewing 16 posts - 1 through 16 (of 24 total)

You must be logged in to reply to this topic.