August 9, 2017 at 11:07 UTC - Views: 109 #50717
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)
- The top video instance is a test with the vc video element – that works
- 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 stumpedAugust 9, 2017 at 15:19 UTC - Views: 103 #50718
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.August 9, 2017 at 16:57 UTC - Views: 98 #50720
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 usedAugust 9, 2017 at 17:30 UTC - Views: 95 #50722
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.August 9, 2017 at 17:40 UTC - Views: 92 #50724
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 ]August 9, 2017 at 17:51 UTC - Views: 87 #50725
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.August 9, 2017 at 17:59 UTC - Views: 83 #50726
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 zzAugust 9, 2017 at 18:08 UTC - Views: 78 #50727
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.August 9, 2017 at 18:22 UTC - Views: 73 #50728
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.August 9, 2017 at 20:32 UTC - Views: 69 #50734
@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.August 9, 2017 at 20:40 UTC - Views: 66 #50735
You are right, this is so very weird.
With or without quotes, alone, never works
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.August 10, 2017 at 11:35 UTC - Views: 48 #50745
My YouTube videos inserted with shortcodes using either “youtube” or “weaver_youtube” are still working.
This is a sample page:
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.
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)?August 10, 2017 at 18:25 UTC - Views: 33 #50755
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.August 11, 2017 at 00:31 UTC - Views: 28 #50758
@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?August 11, 2017 at 01:02 UTC - Views: 26 #50759
From my test, if you use text mode AND “Allow Raw HTML and Script” it worksAugust 11, 2017 at 01:18 UTC - Views: 24 #50760
Just confirming that I’m NOT using “Allow Raw HTML and Script” in conjunction with text mode on my sites.
You must be logged in to reply to this topic.