WordPress.org

Ready to get started?Download WordPress

Forums

WordPress NextGen GalleryView
[resolved] WordPress Nextgen Galleryview JS & CSS causing my site to not be secure (8 posts)

  1. TraciBunkers
    Member
    Posted 1 year ago #

    I installed the plugin, and noticed it is causing my shop (shopp plugin) to not be secure, even though I'm not using it in my shop.

    The problem is with the javascript & css. Is there a way to move the scripts so that this won't happen?

    Here are the errors:

    Unsecured CSS/Scripts/Style Sheets:
    <script src="http://www.tracibunkers.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/scripts/jquery.timers-1.1.2.js" >
    <script src="http://www.tracibunkers.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/scripts/jquery.easing.1.3.js" >
    <script src="http://www.tracibunkers.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/scripts/jquery.galleryview-2.0.js" >
    <link href="http://www.tracibunkers.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/css/galleryview.css" >

    I'm using wordpress 3.4.2 & wordpress nextgen galleryview 0.5.2

    http://wordpress.org/extend/plugins/wordpress-nextgen-galleryview/

  2. Enzo12 LLC
    Member
    Posted 1 year ago #

    Use relative http / https in the code.

    See the example about mid way down the page:

    http://stackoverflow.com/questions/584251/short-way-to-link-to-http-from-https-and-vice-versa-using-relative-links

    Basically if the site is on http, it will use that. If the site is on https, it will use that.

  3. TraciBunkers
    Member
    Posted 1 year ago #

    All of my other javascript is being called through https.

    Except this one, even when I'm in my shopp, which is https

    I was hoping not to change the code of the plugin because then when it's updated, I might not remember to change it again.

  4. TraciBunkers
    Member
    Posted 1 year ago #

    Here's what I did, based on finding this:

    in the nggGalleryViewSharedFunctions.php, I changed this:

    function nggGalleryViewHead() {
      wp_enqueue_script('jquery');
      wp_enqueue_script('jquery-ui-core');
      echo '<!-- begin nextgen-js-galleryview scripts -->
              <script type="text/javascript"  src="'.GALLERYVIEW_URL.'/GalleryView/scripts/jquery.timers-1.1.2.js"></script>
              <script type="text/javascript"  src="'.GALLERYVIEW_URL.'/GalleryView/scripts/jquery.easing.1.3.js"></script>
              <script type="text/javascript"  src="'.GALLERYVIEW_URL.'/GalleryView/scripts/jquery.galleryview-2.0.js"></script>
              <link   type="text/css"        href="'.GALLERYVIEW_URL.'/GalleryView/css/galleryview.css" rel="stylesheet" media="screen" />
            <!-- end nextgen-js-galleryview scripts -->
           ';
    }

    to this:

    function nggGalleryViewHead() {
      wp_enqueue_script('jquery');
      wp_enqueue_script('jquery-ui-core');
      echo ' ';
    }

    So, I took out the script source URLs.
    Then I pasted what I cut out, into the header of my theme. And, I put the full URL with https. So here's what I have:

    <script type="text/javascript"  src="https://www.MYSITE.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/scripts/jquery.timers-1.1.2.js"></script>
              <script type="text/javascript"  src="https://www.MYSITE.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/scripts/jquery.easing.1.3.js"></script>
              <script type="text/javascript"  src="https://www.MYSITE.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/scripts/jquery.galleryview-2.0.js"></script>
              <link   type="text/css"        href="https://www.MYSITE.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/css/galleryview.css" rel="stylesheet" media="screen" />
  5. TraciBunkers
    Member
    Posted 1 year ago #

    Actually, all I needed to do was put in my full URL into the ViewSharedFunctions.php file. So I deleted what I put into my themes header, and now that section of ViewSharedFunctions.php has this in it:

    function nggGalleryViewHead() {
      wp_enqueue_script('jquery');
      wp_enqueue_script('jquery-ui-core');
      echo '<!-- begin nextgen-js-galleryview scripts -->
              <script type="text/javascript"  src="https://www.MYSITE.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/scripts/jquery.timers-1.1.2.js"></script>
              <script type="text/javascript"  src="https://www.MYSITE.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/scripts/jquery.easing.1.3.js"></script>
              <script type="text/javascript"  src="https://www.MYSITE.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/scripts/jquery.galleryview-2.0.js"></script>
              <link   type="text/css"        href="https://www.MYSITE.com/blog/wp-content/plugins/wordpress-nextgen-galleryview/GalleryView/css/galleryview.css" rel="stylesheet" media="screen" />
            <!-- end nextgen-js-galleryview scripts -->
           ';
    }
  6. TraciBunkers
    Member
    Posted 1 year ago #

    This plugin seems to be slowing my site down. So instead of changing the code so that it's using https, I think it would be better if I could only have it load where it's needed, and exclude it from loading in shopp. But I can't figure out how to do that.

  7. TraciBunkers
    Member
    Posted 1 year ago #

    New problem.

    I decided to deactivate the plugin, but when I do, it causes CSS to show up as text on product pages in my online shop. As soon as I re-activate it, the CSS disappears.

    While it was activated, I deleted it via FTP to see if that would help. But it didn't. I had to put it back on my site. I also wondered if the changes I made were causing this. So I reinstalled it--same thing.

    How can I deactivate this without the problem. Do I need to do something to my database?

  8. TraciBunkers
    Member
    Posted 1 year ago #

    I finally figured it out! It's so odd. The WP Facebook Open Graph protocol plugin was causing this issue. When I deactivated that plugin, all of the CSS disappeared. Whew! Crazy.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic