akamp
Forum Replies Created
-
@pigo3934blog Second answer is correct:
Latter fix will bypass the replacements intended for this plugin, but everything is working again
And hopefully next version will restore original functionality.
My advice:
Fix every link/dependency to HTTPS if possible. Then, this plugin isn’t needed anymore.Version 2.1 is totally rewrite than 2.0:
2.0 replaces urls starting ‘http(s)://’ within defined attributes (href/src/srcset/action) within defined tags (script,link,base,img,a,…) using regex
2.1 replaces all parts containing ‘http(s):’ in HTML content (enqueued headers are checked for sent content-type). If 2 more slashes were added to the check and replacement – like all previous versions – my issue wouldn’t exists.Compared to 1.5.3:
Predefined replacements (like in 2.0) are converted into a single one which conflicts in my situation due to loosely regex.My opinion, 2.0 looks more reliable and much cleaner, but maybe not flexible enough to cover all the predicted patterns. The size of 2.1 is also more than doubled, but that’s mainly due to embedding the ‘Ultimate Social Media plugin’ notice things.
Latest version of the plugin also breaks Really Simple SSL plugin:
File really-simple-ssl/class-front-end.php
r162 $script .= 'if (document.location.protocol != "https:") {'; r163 $script .= 'document.location = document.URL.replace(/^http:/i, "https:");';It replaces out the protocol to check against, so site is looping. This is because the JS is embedded in the response/buffer which is processed in mainPath().
Fixed by renaming the plugin directory of http-https-remover – or modifying http-https-remover.php by adding (after line 137)
return $buffer;before detecting content_type.
(Latter fix will bypass the replacements intended for this plugin, but everything is working again. Don’t forget to flush caches (like page_enhanced) otherwise the ‘loopy’ response will still be returned).And hope next update will fix this issue…
Forum: Plugins
In reply to: [TK Google Fonts GDPR Compliant] Fonts loaded through http instead of httpsHi Sven,
Version 1.3.2 still contains a link to non-https URL.
In file tk-google-fonts/includes/helper-functions.php line 27, I replaced ‘http://fonts.googleapis.com’ to ‘//fonts.googleapis.com’. That worked for me.The whole file can be simplified because of (nearly) duplicated code: wp_register_style/wp_enqueue_style function calls in ‘selected_fonts’ loops. But that’s my opinion.