Title: Not working on Multisites automatically
Last modified: May 30, 2019

---

# Not working on Multisites automatically

 *  Resolved [dogel](https://wordpress.org/support/users/dogel/)
 * (@dogel)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/)
 * Hi,
 * I am sorry to say, but the plugin doesn’t really work in a satisfying way on 
   a multisite of mine. The link I added leads to a post on a sub-site of that multi-
   site (video is at the end of the post).
 * I can only get it to work if I change the “https” part of the youtube link to“
   httpv” in the **code editor**. But it is not possible to make that change in 
   the visual editor, which is the only thing I can expect from my clients (i.e.
   clicking on the video and choosing “edit”) – the saved code will always switch
   back to https, and with https the plugin doesn’t work although “Also act on normal
   YouTube links and iframes?” is activated.
 * Note: The plugin “Easy FancyBox” (which _can_ handle YouTube links) is also installed,
   but first its Youtube options are deactivated, and secondly, I deactivated it
   for testing purposes (cleared all cache) and Youtube Lyte still wouldn’t work.
 * Any chance to get that working for regular Youtube links?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fnot-working-on-multisites-automatically%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/not-working-on-multisites-automatically/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/not-working-on-multisites-automatically/page/2/?output_format=md)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11588861)
 * No idea what is happening there I’m afraid [@dogel](https://wordpress.org/support/users/dogel/),
   normally it does work on youtube links (I use it like that myself). Maybe a plugin
   conflict of some kind?
 *  Thread Starter [dogel](https://wordpress.org/support/users/dogel/)
 * (@dogel)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11588880)
 * As I described, I tried to deactive the only plugin that possibly _could_ be 
   a conflict (Easy FancyBox), which didn’t make a difference.
 * And it also can’t be a conflict with the theme – I wrote the theme myself, and
   it has _no_ Youtube-related functionality in it whatsoever.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11588923)
 * Had a look at the HTML source, looks like WordPress oEmbed is somehow parsing
   the link iso LYTE, maybe try [disabling oEmbed](https://wordpress.stackexchange.com/questions/202496/disable-automatic-oembed-of-a-youtube-url-within-the-content)?
 *  Thread Starter [dogel](https://wordpress.org/support/users/dogel/)
 * (@dogel)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11589005)
 * Hmm – I tried that, but now the link is displayed as pure text (in the editor
   the video is displayed, but not on the page itself)
 * (FWIW: Another post on the parent website for which I changed the code to “httpv”
   still is displayed as expected: [https://www.youtube.com/watch?v=bCqe93FtiZU](https://www.youtube.com/watch?v=bCqe93FtiZU))
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11589120)
 * Is there any difference how this works on the main vs child sites? I mean; does
   https-youtube links work on the main site?
 *  Thread Starter [dogel](https://wordpress.org/support/users/dogel/)
 * (@dogel)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11589155)
 * No, https-Links also don’t work as expected on the main site (i.e. a normal Youtube
   embed is shown, and when I disable oEmbed, the link is shown as pure text).
 * Actually, I don’t really know whether it has to do with the multisite setup…
 * FWIW: I am using “Disable Gutenberg”, “TinyMCE Advanced” and “TinyMCE Custom 
   Styles”, but I suppose all this shouldn’t affect the display on the page itself,
   but only the editor. (?)
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11589177)
 * The only next step I can think of is disabling other plugins one at a time and
   even briefly switching themes to a stock wordpress core one dogel, I have no 
   other ideas.
 *  Thread Starter [dogel](https://wordpress.org/support/users/dogel/)
 * (@dogel)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11589361)
 * Okay, I found that this has nothing to do with multisite or not – I tested it
   on another website of mine (in a private post – can’t post the link here), and
   it also doesn’t work.
 * So i am going to check all the other plugins…
    -  This reply was modified 7 years ago by [dogel](https://wordpress.org/support/users/dogel/).
 *  Thread Starter [dogel](https://wordpress.org/support/users/dogel/)
 * (@dogel)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11589715)
 * It seems I found the weak spot (although unfortunately no solution yet):
 * As I wrote, I am using the “TinyMCE Advanced” plugin. Now, when I deactivate 
   it, edit the post and save it, Youtube Lyte works as expected.
 * When I activate “TinyMCE Advanced” again and do *not* edit the post, Youtube 
   Lyte still works as expected.
 * However, as soon as I change anything in that post (with “TinyMCE Advanced” active),
   Youtube Lyte again fails to work.
 * Any idea what to do?
 *  Thread Starter [dogel](https://wordpress.org/support/users/dogel/)
 * (@dogel)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11590018)
 * Another step forward:
 * It’s due to the “Keep paragraph tags in the Classic block and the Classic Editor”
   option in TinyMCE Advanced. If I deactivate it, “Youtube Lyte” works as expected.
 * Unfortunately this is one of the main reasons why I use this plugin – I want 
   to be able to edit HTML, including <p> tags and classes I add to them…
 * Does “Youtube Lyte” work differently if a Youtube link is wrapped in a <p> tag
   or not?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11590052)
 * LYTE only treats YT-links of they’re at the start of a line, so
 *     ```
       <p>
       https://youtu.be/xyz
       </p>
       ```
   
 * would work but
 *     ```
       <p>https://youtu.be/xyz</p>
       ```
   
 * not.
 *  Thread Starter [dogel](https://wordpress.org/support/users/dogel/)
 * (@dogel)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11590105)
 * Ah, now the reason is clear!
 * So if I want to keep my settings I have to “train” my clients to use a line break(
   shift + return) instead of a new paragraph (return) when they insert a Youtube
   link. Hmm – for some of them this is going to be tough… 😉
 * Anyway – thank you very much for all your quick responses!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11590942)
 * well, if you want your clients not to have to worry, you could create a little
   filter (hooking into `lyte_content_preparse`) to remove `<p>` in front of youtube
   links? 🙂
 *  Thread Starter [dogel](https://wordpress.org/support/users/dogel/)
 * (@dogel)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11591786)
 * hmm – I am not so sure how to accomplish that…
 * But anyway: Why are Youtube links only treated at the beginning of a line – is
   there a technical reason? What difference would it make _always_ converting them,
   regardless if they are at the beginning of a line or not?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/#post-11592406)
 * this should work;
 *     ```
       add_filter('lyte_content_preparse','lyte_remove_leadingp');
       function lyte_remove_leadingp($in){
         $out = preg_replace('#^<p>(http(?:s)?://(?:www.)?youtu)#','$1',$in);
         return $out;
       }
       ```
   
 * re. reason; because users may wish to add a youtube URL in their content without
   expecting it to be rendered as a video 🙂

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/not-working-on-multisites-automatically/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/not-working-on-multisites-automatically/page/2/?output_format=md)

The topic ‘Not working on Multisites automatically’ is closed to new replies.

 * ![](https://ps.w.org/wp-youtube-lyte/assets/icon-128x128.png?rev=1836005)
 * [WP YouTube Lyte](https://wordpress.org/plugins/wp-youtube-lyte/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-youtube-lyte/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-youtube-lyte/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-youtube-lyte/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-youtube-lyte/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-youtube-lyte/reviews/)

 * 21 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/not-working-on-multisites-automatically/page/2/#post-11595382)
 * Status: resolved