0

I'm having problems on a website after adding an SSL certificate. These are the WhyNoPadlock results: https://www.whynopadlock.com/results/7193cea2-78e7-4bc7-9581-2af7f90bd15d

What I’ve done so far:

  1. Changed all to HTTPS in WP settings
  2. Used Better Search Replace to replace all instances of HTTP with HTTPS.

This hasn't fixed things and any advice on how else to resolve these hard and soft failures very appreciated.

Another problem is that since adding the SSL certificate, the slider which should appear on the home page has disappeared. It uses an old plugin called Cross Slide Cross Fade, which hasn’t been updated for a few years. I’m presuming this may also be a result of a mixed content error but any other thoughts on this also appreciated. I'm hoping it's simply a question of sorting out any http/https conflicts in it but also wonder if push comes to shove if it would be better to uninstall it and try using a more modern slider plugin?

Many thanks

  • 1
    Did you go through your theme and plugins for hardcoded URLs? You tried to change everything in the database but didn't change any of the files. Also, using the jQuery from the CDN isn't great and it's using an insecure URL, don't deregister/re-register jQuery – Tom J Nowell Jun 17 at 11:28
  • It looks like the stray jQuery is from the cross-slider plugin, yes, and it won't work with WordPress's included jQuery because it's trying to use $() not jQuery(). The plugin changelog says it should be fixed in version 1.6 - can you get hold of a later version? There's a version 2.0.5 in Subversion if you can get it from there. Alternatively you can probably just edit the http:// to https:// in the plugin, or change the two $( to jQuery( and it should work again. – Rup Jun 17 at 11:33
  • Thank you both. Must admit I'm more of frontend designer with knowledge of HTML and CSS and jQuery is somewhat beyond me! I think in the log run it is going to be better to switch to a more up to date slideshow plugin. I would like to try and make a temporary fix if I can. Rup, I did a search for the version you mention in Subversion but couldn't find it - are you able to send a link to it please? I can see that I can edit the plugin code - you said there are two $( which I need to change to jQuery( - are they on particular lines of the code in the file jQuery.cross-slide.js? Many thanks – user152362 Jun 17 at 12:14
  • Tom, when you say go through the theme & plugins for hardcoded URLs, does that mean scan through the code & see if I can spot any random HTTP links & update them to HTTPS manually? I tried this with the soft failures re links to social media icons in footer document but got an error message within Wordpress: 'Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as using SFTP.' Is only way to update these URLs editing the file locally & uploading the new version via Filezilla? Steph – user152362 Jun 17 at 12:17
  • 1
    Hi Tom - just to update as you'll see below - using Filezilla I made changes to the areas where hard and soft failures were showing up in WhyNoPadlock and this has now resolved the mixed content errors. Thanks again for your input. – user152362 Jun 17 at 13:11
0

You have version 1.6.0 of the crossslide plugin. (I'd guessed 1.5.2 since the changelog said 1.6.0 fixed this, but it didn't.)

You can fix this by

  1. unticking the 'Default jQuery' option in the plugin configuration, which removes the ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js include

  2. replacing $( with jQuery( on lines 101 and 102, i.e. instead of

     $(function(){
         $('#crslideshow').crossSlide({
    

    you should have

    jQuery(function(){
        jQuery('#crslideshow').crossSlide({
    

    (This is because WordPress sets up jQuery in noConflict mode by default, where it does not define itself as $. Including the second jQuery script did set up $ with the old version.)

Here's a gist of roughly what you should be left with. (There is another set of $( to jQuery( changes on lines 120-133, but you don't need those for the mode you're running the plugin in.) It should now work again. The original CrossSlide author does recommend using something more modern, but it should continue to work fine.

You could also upgrade the plugin to 2.0+ which would already contain this fix; it's not available for download anymore, but the files are in subversion (see the 'Development' tab of the plugin page).

| improve this answer | |
  • Hi Rup - many thanks for this. I made those changes to the code in the plugin file but unfortunately the slider still doesn't appear. It looks as if all things are pointing to starting afresh with a new slider. The good news though is that updating that code and also updating the links in the footer document has resolved the mixed content errors and the padlock now shows on Chrome and elsewhere, so a breakthrough on that score! whynopadlock.com/results/f35da1ed-7c06-4a41-ba9f-b78a56025161 Appreciate your time and it has been helpful to clarify that the plugin may just be too old. – user152362 Jun 17 at 13:09
  • Oops, sorry: the problem now is that you're echoing two <script src=' where you should only have one, somewhere around line 105 I'd guess. It should go straight from that into the setting and echoing $x code. – Rup Jun 17 at 13:19
  • Ah, thanks for this.Yes, I found a duplicate - these were right next to each other and so I took out one, which was echo "<script src=' ". However, the slider is still not appearing unfortunately. – user152362 Jun 17 at 13:53
  • Now you're missing the script URL, the two lines that started $x= I think. – Rup Jun 17 at 13:56
  • Ah, sorry, I'll have to ask you to bear with me as I'm getting a bit baffled! The script URL was this URL which I took out? ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js – user152362 Jun 17 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.