• Resolved trick77

    (@trick77)


    Fantastic plugin André, really appreciate it!

    On my https site I had to comment one line in applyJSCodeChanges:

    function applyJSCodeChanges($strCode) {
            // Change code if js/index.php should be used
            if (self::$aryGlobalSettings['track_mode'] == 1) {
                $strCode = str_replace('piwik.js', 'js/', $strCode);
                $strCode = str_replace('piwik.php', 'js/', $strCode);
            } elseif (self::$aryGlobalSettings['track_mode'] == 2) {
                $strCode = str_replace('piwik.js', 'piwik.php', $strCode);
                $strURL = str_replace('https://', '://', self::$aryGlobalSettings['piwik_url']);
                $strURL = str_replace('http://', '://', self::$aryGlobalSettings['piwik_url']);
                $strProxy = str_replace('https://', '://', plugins_url('wp-piwik'));
                //$strProxy = str_replace('http://', '://', plugins_url('wp-piwik')); <----
                $strCode = str_replace($strURL, $strProxy, $strCode);
            }

    I don’t think you can call str_replace on $strProxy twice in a row that way, you probably need an if there.

    Cheers

    http://wordpress.org/extend/plugins/wp-piwik/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author braekling

    (@braekling)

    Thanks for your post.

    Can you try this change, please?

    $strURL = str_replace('https://', '://', self::$aryGlobalSettings['piwik_url']);
    $strURL = str_replace('http://', '://', $strURL);
    $strProxy = str_replace('https://', '://', plugins_url('wp-piwik'));
    $strProxy = str_replace('http://', '://', $strProxy);

    If this works fine, I’ll provide an update soon.

    Thread Starter trick77

    (@trick77)

    Working fine, thanks.

    Plugin Author braekling

    (@braekling)

    Great, I’ll create a fix. It will be released with 0.9.9.2.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with HTTPS in proxy mode’ is closed to new replies.