Home › Forums › Weaver Xtreme Theme › Youtube Shortcode not working
- This topic has 23 replies, 4 voices, and was last updated 6 years, 4 months ago by
scrambler.
-
AuthorPosts
-
August 9, 2017 at 11:07 UTC - Views: 110 #50717
bcslaam
ParticipantI 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/
- 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 stumped
August 9, 2017 at 15:19 UTC - Views: 106 #50718Weaver
KeymasterI 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: 105 #50720scrambler
ModeratorI 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
August 9, 2017 at 17:30 UTC - Views: 97 #50722bcslaam
ParticipantAs 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: 94 #50724scrambler
ModeratorSorry I missed that.
@weaver, It appears to work if you put the ID in quotes. Both below work for meID [youtube id='FK-A8iidKtM'] URL [youtube https://www.youtube.com/watch?v=FK-A8iidKtM ]
August 9, 2017 at 17:51 UTC - Views: 89 #50725bcslaam
Participantmmm 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: 85 #50726bcslaam
ParticipantJust 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
August 9, 2017 at 18:08 UTC - Views: 79 #50727scrambler
ModeratorStrange 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: 77 #50728Weaver
KeymasterI 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: 70 #50734Weaver
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.
August 9, 2017 at 20:40 UTC - Views: 68 #50735scrambler
ModeratorYou 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.
August 10, 2017 at 11:35 UTC - Views: 68 #50745Gillian
ModeratorMy 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)?
August 10, 2017 at 18:25 UTC - Views: 44 #50755Weaver
KeymasterI 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: 31 #50758Gillian
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?
August 11, 2017 at 01:02 UTC - Views: 27 #50759scrambler
ModeratorFrom my test, if you use text mode AND “Allow Raw HTML and Script” it works
August 11, 2017 at 01:18 UTC - Views: 25 #50760Gillian
ModeratorJust confirming that I’m NOT using “Allow Raw HTML and Script” in conjunction with text mode on my sites.
-
AuthorPosts
- You must be logged in to reply to this topic.