We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36760
    • 136 Posts
    I'm using MODX Revolution 2.5.1-pl and SimpleSearch 1.9.2-pl.

    I had setup SimpleSearch to mimic the old ajaxSearch functionality using the methods here: http://himmdesign.com/blog/2011/06/28/the-return-of-modx-ajaxsearch-with-simple-search-in-revolution/. It was working fine until I switched my site over to HTTPS. Now, I get a Mixed Content error when using the search box:

    Mixed Content: The page at 'https://www.dvorakgaming.com/world-of-warcraft/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.dvorakgaming.com/search-results/?search=drui&id=2'. This request has been blocked; the content must be served over HTTPS.


    I've tried setting up my jQuery to explicitly use the https URL as follows:

    $('.sisea-search-form').submit(function () {
    			$('#site-search-results').load('https://www.dvorakgaming.com/search-results .sisea-results-list',$('.sisea-search-form').serialize()).show();
    				return false;												
    			});
    			$('.sisea-search-form input').keyup(function() {
    				if(this.value.length > 2){
    					$('#site-search-results').load('https://www.dvorakgaming.com/search-results .sisea-results-list',$('.sisea-search-form').serialize()).show();
    				}else{
    					$('#site-search-results').hide();
    				}
    			});
    			$('body').click(function(e) {
    				if(!$(e.target).hasClass('site-search')){
    					$('#site-search-results').hide();
    				}      
        	});


    I've also tried making the "action" URL in the SearchFormTpl explicitly use the https URL:

    <form class="sisea-search-form" action="[[~[[+landing:default=`[[*id]]`]]? &scheme=`https`]]" method="[[+method:default=`get`]]" autocomplete="off">
        <input type="text" name="[[+searchIndex]]" id="[[+searchIndex]]" value="[[+searchValue]]" />
        <input type="hidden" name="id" value="[[+landing:default=[[*id]]]]" />
        <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
    </form>


    Neither of those made a difference, and I honestly can't figure out where it's getting the regular http URL from. If I turn off the jQuery, the form goes to the https search results page, but I believe that's only because I have a redirect setup for http to https. I'm not sure if this is more a simpleSearch issue or just something with jQuery, searching around didn't yield any leads.

    I appreciate any help! [ed. note: firebot6 last edited this post 7 years, 5 months ago.]