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

This topic contains 3 replies, has 2 voices, and was last updated by

 
Keymaster
1 year, 3 months ago.

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

    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

    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #29700

    Participant

    Thanks for your help! This worked perfectly.

    #29701
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.