CommentLuv Support for Fixing the Errors Caused by Https Links

CommentLuv: How to Fix the Errors Caused by Https Links

CommentLuv Support for Fixing the Errors Caused by Https Links

CommentLuv is a popular WordPress plugin that unfortunately hasn’t been updated lately.

More and more bloggers switch their blogs to https. But CommentLuv doesn’t like these links. And it displays errors in some specific cases.

I can hear you saying that you didn’t switch to https yet, so CommentLuv works fine for you.

No, it doesn’t. So keep reading, this article is useful also for you.

After I moved this blog to https, I identified two CommentLuv errors:

1. An error occurred on my blog when someone tried to comment.

2. An error occurred on any other CommentLuv enabled blog when I tried to comment – irrespective of whether that third party blog was http or https.

Now let’s see the errors and how to fix ’em.

Error #1: The Plugin Doesn’t Retrieve Commenter’s Last Blog Post

So I switched this blog to https, then I logged out and I tried to comment as if I was you, one of my readers.

Instead of the latest blog post related to the blog I filled in the Website field, this error message was displayed:

“It appears that you are offline or another error occured contacting the API url, have you set it to use www or missed the www off the api url?? Check the technical settings and add or remove www from the api url.”

Very misleading. As if it’s the commenter’s fault.

I tried to fill in another blog address. Got the same error no matter what blog address I filled in the Website field. Obviously not the commenter’s fault, the problem was with this blog.

So I checked CommentLuv settings and I discovered how to fix the problem. Go to Settings >> CommentLuv, and on that settings page you’ll find a link named “Click to open technical settings.”

Click that link. An extra table will open on the same page. Look for the section “API URL”:

Example of CommentLuv Settings

On your blog, instead of my domain name will be yours:
http://www.yourdomainname.com/wp-admin/admin-ajax.php

Well, add the letter “s” after http:
https://www.yourdomainname.com/wp-admin/admin-ajax.php

Then click the button “Save Settings.” That’s it. Problem solved. The commenters with http blogs will be able to comment and have their latest blog post displayed with the help of CommentLuv. What about the commenters with https blogs? See the next error!

Note #1: After I switched to https, I didn’t want to use a plugin for redirecting all http pages to the correspondent https pages. A big NO for using yet another plugin! So I did the redirection using the file .htaccess. If you use a plugin for the redirection, maybe it will also change the setting above. Maybe – I just don’t know. But if that plugin doesn’t make the change and you still get the error shown above, now you know how to fix it.

Note #2: If you didn’t migrate your blog to https, then this error doesn’t appear on your blog. Don’t change the setting.

Error #2: Commenter’s Https Link Is Assessed as Incorrect URL

Irrespective of whether your blog is http or https, the commenters who post a https link in the Website field of your comment area will get this CommentLuv error:

“Please use http:// in front of your url.”

As if https links are bad or incorrect.

That’s an inappropriate error message caused by poor coding or bad judgement from the developer’s side.

If the commenter adds http in front of the URL (in front of the https link) nothing good will happen.

If the commenter replaces https by http, then the plugin will work. But making such a replacement is a non-sense, and some people won’t do it. Because they may think that it’s something wrong with your plugin. And they are right…

The real fix is for the blog owner to update CommentLuv.

Warning: The following fix refers to the latest free version of this plugin, i.e. CommentLuv 2.94.7 and to the latest premium version, i.e. CommentLuv 3.0.6.3. It may or may not work on other versions. I didn’t check their source codes.

You will have to modify the following file from the folder js of your CommentLuv plugin:

commentluv.js (if you have the free version)

commentluv-premium.js (if you have the premium version)

Find this piece of code:

if(url.val().toLowerCase().substring(0,7)!=’http://’
)
{url.addClass(‘cl_error’);cl_message(cl_settings[‘no_http_message’]);return;}

and modify it as follows:

if(url.val().toLowerCase().substring(0,7)!=’http://’
&&url.val().toLowerCase().substring(0,8)!=’https://’
)
{url.addClass(‘cl_error’);cl_message(cl_settings[‘no_http_message’]);return;}

The original piece of code says something like this: “If the first seven characters of the URL aren’t http:// then display the error message.”

My modified code says: “If the first seven characters of the URL aren’t http:// and the first eight characters aren’t https:// then display the error message.”

Note #1: I split the codes on more lines only for the sake of you seeing clearly the difference between them. I also marked the difference using a yellow background. The actual code for the free version isn’t split like that on more lines. Copy the yellow code and insert it in the original code between ‘http://’ and )

Note #2: In order to be on the safe side, before making any code change do this: make a copy of the original file that you’re going to edit. Name it commentluv-original.js

After you edit the file commentluv.js (or commentluv-premium.js, as appropriate), see if the problem is fixed. If it isn’t fixed, then:

a) you made a mistake or
b) you’re using a CDN (content delivery network) or a cache plugin.

If you’re using a CDN or a cache plugin, turn them off and see if the problem is fixed. If it’s still not fixed, then you made a mistake.

If you cannot identify the mistake, go back to the initial plugin: delete the modified file, then revert the file commentluv-original.js to the original name commentluv.js (or commentluv-premium.js, as appropriate) and upload it to the folder js.

To Your Blogging Success!
Adrian Jock

P.S. If you’re not 100% sure that you understood the fix for the second error, please feel free to ask your questions using the comment area below.

Time & Action-Based Autoresponders. Landing Pages. Webinars
 
“GetResponse is head and shoulders above the rest. I call it my email marketing secret weapon!” – Neil Patel, Kissmetrics

Epic comparison: AWeber vs GetResponse
Start your GetResponse free trial now!
Adrian Jock's
Internet Marketing
Tips & News
Wanna improve your internet marketing skills in order to make more money online? Subscribe to my newsletter. Period!
Bonus: my list of free tools and resources that I use in order to run this blog and all related activities ;)

10 thoughts on “CommentLuv: How to Fix the Errors Caused by Https Links

  1. Fantabulous, Adrian!

    I’ve been having these errors on sites I try to comment on and leave my linky. It’s so annoying that I stopped trying. The blog owner also has made me feel like it was my issue, not the plugin. Sadly enough, Andy isn’t well enough to update the plugin in any longer. I wish someone would take it over because I did like using CLuv. However, with no update in the foreseeable future, I discontinued using it.

    So happy that you took the time to tweak the coding. You know I’ll be passing this along so others can tweak theirs too!

    Thanks Adrian!
    Bren Lee recently posted: Forgetting to Update Your Plugins Can Become an “Oh Shat!” Moment

    1. Thank you for your comment and social media shares, Bren!

      I doubt that someone will be able in the near future to release a formal update. Since Andy’s site is down, I guess the assumption that he didn’t sell the site and the plugin is quite correct. Therefore the plugin is still his product and only he can formally release an official updated version :(

    1. You’re welcome, Paul. I don’t know whether the curly apostrophes displayed by the font I use may cause problems or not, but it’s good that you changed them. To be on the safer side, I updated the post and I used another font for the codes. Thanks for your comment!

  2. Thanks Adrian, I fixed it – I believe. I followed the instructions. When I was first told by some of my readers about the error, I turned off the Gasp and then turned it back on and it worked. But they didn’t have the https in front of their urls either. I hope you can test it out for me. Thanks for this post Adrian. It’s too bad this plugin won’t get updated :(
    Lisa Sicard recently posted: 6 Valuable Ways You Will Benefit Using Twitter Now

    1. You’re welcome, Lisa. Yes, it’s too bad that this plugin won’t get updated. I rarely comment on blogs that don’t have it enabled. When I comment I like to kill two birds with one stone, and it cannot be done without CL.

  3. Adrian,

    Thanks for the heads up on this issue! I had no idea that people with https where having issues leaving blog comments. I think I’ve updated everything correctly and appreciate the advice.

    I didn’t realize that the Comment Luv plug-in wasn’t going to be updated. Is there another program that is similar or is it okay to continue to use it?

    Thanks,
    Amy
    Amy White recently posted: How To Use Personal Capital for Retirement Planning

    1. Hi Amy,

      I checked both your blogs and I noticed that you didn’t make the correct update. You addressed the error #1 that wasn’t related to your blogs while you didn’t address the error #2 that is displayed by your blogs. The result is that now CL doesn’t work anymore on your blogs.

      You weren’t supposed to address the error #1, see the last paragraph (Note #2) from that section of the article: “If you didn’t migrate your blog to https, then this error doesn’t appear on your blog. Don’t change the setting.”

      So change back that technical setting. The other error (#2) is displayed on your blogs ;)

      The answer to your questions:

      1) unfortunately there’s no similar plugin available;

      2) I still use CL on this blog, but I can’t tell you to do the same. That’s because it’s not recommended to use plugins that weren’t updated for a long period of time.

      1. Thanks yet again for the heads up! I appreciate all of the help you’ve given me over the last few years. So I fixed the first, but will have to wait until later to do the second. I remember it being a bit more complicated and need some baby free time!
        I wish there were another product on the market to use. I love the concept of CL, but am concerned about using a plugin that isn’t updated. I’m just not technically proficient enough to be able to fix issues.

        1. You’re very welcome, Amy. Fixing the second error is more complicated indeed and you need basic tech knowledge, it cannot be done by everyone. So read the instructions carefully and ask me questions if you don’t understand something.

Your thoughts or questions are welcome. Leave a comment...

Your email address will not be published. Required fields are marked *

Note: Whether you read the Comment Policy or not, it still applies to your comments.
 

Warning: It's OK not to subscribe to getting notifications regarding the replies to your comment. However, if you're not interested in reading such replies and you don't subscribe to get 'em, then don't expect me to write 'em ;)

Tick the box to enable CommentLuv