Modules preventing full https site

Hi all!,

We’re running OJS 2.4.8.0. and recently we’ve got installed a SSL certificate for our journal site (https://aldizkaria.ankulegi.org/index.php/ankulegi).

Https works fine on the home page, but not on the article pages. According to https://www.whynopadlock.com/check.php (a fine online free tool for searching for culprits, BTW), there is a couple of modules that are preventing us from finishing the process successfully:

  1. Piwik connector. In the ‘Settings’ page, we tried to update Piwik URL to “https://…”, but as we got an error (“Please enter a valid url. Include http:// at the start”), we had to disable the tool. :frowning:

  2. AddThis. Here, the unsecure URL is the button’s one (http://s7.addthis.com/static/btn/lg-share-es.gif). We couldn’t find how to change that, so we disabled the tool, but the green padlock still is missing!! :cry:

Any help would be much appreciated. Kind regards,

Hi @ankulegi,

To permit both of these elements to behave in a protocol-neutral fashion…

  • Apply this patch to make the AddThis image use a protocol-relative URL
  • Edit plugins/generic/piwik/PiwikSettingsForm.inc.php and find the line:
$this->addCheck(new FormValidatorCustom($this, 'piwikUrl', 'required', 'plugins.generic.piwik.manager.settings.piwikUrlRequired', create_function('$piwikUrl', 'return strpos(trim(strtolower_codesafe($piwikUrl)), \'http://\') === 0 ? true : false;')));

Remove or comment this line to remove restrictions on the Piwik URL field. (A better solution would be to edit this to allow protocol-relative URLs and https URLs – if you’re willing to tackle that, please consider sending in a pull request.)

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you very much for your quick reply, @asmecher!

Regards,

It worked for me too.
Thank you.