Viewing 4 replies - 1 through 4 (of 4 total)
  • I see two errors reported in the browser script console:
    1. Uncaught SyntaxError: Unexpected token ILLEGAL on career-coaching:17
    2. Uncaught Error: Syntax error, unrecognized expression: a[a[href*=”.pdf”], area[href*=”.pdf”], a[href*=”.PDF”], area[href*=”.PDF”]]:not(.nofancybox), area[a[href*=”.pdf”], area[href*=”.pdf”], a[href*=”.PDF”], area[href*=”.PDF”]]:not(.nofancybox) on jquery.js?ver=1.11.2:2

    The first error causes your analytics code to fail so you might want to fix that (remove the backward slashes!)

    That second one is certainly related to fancybox not working and it’s caused by a source code syntax error but I don’t know why that error is occurring on your site. Did you modify the plugin? If not, you might want to remove the plugin and reinstall it from the WordPress admin PLugins > Add new page.

    If that does not help, disable the PDF media type on Settings > Media and test the Youtube links again.

    Also, please disable ALL other media types that you are not actually using. Leaving everything activated while unused only makes your site slower than it needs to be.

    Thread Starter rogercohen

    (@rogercohen)

    Thanks for your reply.
    I tried first to disable all other media but youtube, but it didn’t work.
    So I deleted the plugin and reinstalled it and it worked. Strange because I’m pretty sure I haven’t edited it at all… Anyway, it works, so thank you!

    I’m not sure to have understood your first point, even though I know you’re trying to help me beyond your plugin: The first error causes your analytics code to fail so you might want to fix that (remove the backward slashes!) Could you please tell me more about it?

    Many thanks for your response and for your great plugin!

    Roger

    Hi Roger,

    Good to hear reinstalling solved your problem!

    But if it was not you or another trusted admin who edited the plugin then it might be time to start changing all admin and FTP user passwords. Just to be on the safe side, not to alarm you, there are some good plugins around that can verify if no other plugin or WP core files have been modified too.

    Not to create panic (there can be false positives too) but it cannot hurt to make sure ??

    About the first error: it is coming from the following Google Analytics code snippet that seems to be added to your themes header.php or maybe it is inserted by a plugin or theme option (can’t tell) :

    <script>
      (function(i,s,o,g,r,a,m){i[\'GoogleAnalyticsObject\']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,\'script\',\'//www.google-analytics.com/analytics.js\',\'ga\');
    
      ga(\'create\', \'UA-27236086-1\', \'auto\');
      ga(\'send\', \'pageview\');
    
    </script>

    All the backslashes in this snippet should not be there.

    Hope these tips help ??

    PS Thanks for the review!

    Thread Starter rogercohen

    (@rogercohen)

    Thanks, fixed!
    All the best,
    Roger

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Youtube fancybox is not working’ is closed to new replies.