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:
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.
Solution No. 1: Changing CL Settings via WordPress Dashboard
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”:
On your blog, instead of my domain name will be yours:
Well, add the letter “s” after http:
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.
Solution No. 2: Changing CL Settings via cPanel
Update July 11, 2017: I’ve just discovered that under some circumstances, on some blogs the change of settings mentioned above is shown to the owner of the blog (to you) but it’s not actually made in your WordPress database. In such a case the error isn’t fixed.
You need to make the update manually in your WordPress database.
Go to phpMyAdmin from your cPanel and look for the table wp_options. Search that table for the row that has this option_name:
– commentluv_options (if you have installed a free CommentLuv version) or
– cl_premium_options_commentluv (if you have installed a premium CommentLuv version), as appropriate.
Then click the link Edit from that row and look for this code:
(in your case, there will be a link specific to your domain, and instead of X you’ll see a figure that corresponds to the number of characters of that link)
Add the letter s to that link (https instead of http) and replace your X by X+1 (because you added one character to the link; btw, do the math, don’t write +1 in that code). Then save the changes. That’s it.
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:
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.
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:
and modify it as follows:
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, clear your cache or 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!
P.S. If you’re not 100% sure that you understood any of the solutions presented here, please feel free to ask your questions using the comment area below.
P.P.S. Update July 12, 2017: Ask simple questions though. If you’re not a very tech person and you need a detailed step-by-step help, sorry, I can’t afford to do it for free anymore. You’ll need to pay for my time. FYI, the time required to fix a problem depends also on your skills and knowledge. I won’t request your passwords and do the actual job. You’ll have to do it yourself based on my written instructions.