This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Issue with information being loaded insecurely after results load

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Issue with information being loaded insecurely after results load

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #29682
    blc_team86blc_team86
    Participant

    The FTP account above will only allow SFTP connections through port 2222

    Issue:
    Please see screencast overview of problem here:
    https://www.loom.com/share/51a96fc8ccee4f6eb01e30ef88b0fd4c

    #29686
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    It usually happens when a site was previously used via the HTTP protocol, and was moved to SSL via a plugin. Those plugins find and replace assets within page contents – usually images – that might still exist with the HTTP protocol URLs. The search tries to recognize these changes internally, but sometimes it fails. However this should be very easy to resolve via a small custom code snippet.

    Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    add_filter('asp_results', 'asp_fix_https');
    function asp_fix_https($results) {
      foreach ($results as $k=>&$v) {
        $v->content = str_replace('http:', 'https:', $v->content);
        $v->image =  str_replace('http:', 'https:', $v->image);
      }
      return $results;
    }

    This should do the trick.

    #29700
    blc_team86blc_team86
    Participant

    Thanks for your help! This worked perfectly.

    #29701
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.