no wpml search results

This topic contains 12 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 9 years, 2 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #3894

    Hi,

    we’re back again.
    The search is visible on all the blogs, but the search only searches in the blog you’re on. The results do not hold all the blogs results.

    As an example try to search for ‘Schoenenreus’ on http://www.onica.nl. You will find 1 page. If you go to faillissement.onica.nl and search for the same word, you will find the proper results.

    The WPML function is on and all the proper blogs are selected. What is going wrong?

    #3905

    Can you let us know how to search the entire multisite from within every blog??

    #3906
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Let me check that for you.

    In the meantime, could you please provide temporary administrator and ftp access as well? It’s most likely impossible to tell if there is an issue by looking at the frontend.

    Best,
    Ernest Marcinko

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


    #3907
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Okay, I might see something.

    You have category selectors activated. It’s not going to work on multisite, since each blog has different categories with different category id’s. So a category with the same name on one blog, might not exist on the other one, since they have different id’s. Unfortunately this is how WordPress works for now.

    So by removing the category selectors (dragging them back and turning them off) should solve the issue.

    Best,
    Ernest Marcinko

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


    #3929

    Thanks, worked like a charm.

    Another question (or do you want us to create a new topic??)

    How can we make sure that the placeholder ‘search’ text stays, even after clicking it but without typing?

    If you click it now the placeholder disappears and leaves our search balk empty.

    #3930
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    No problem at all.

    No need for another topic, this is fine 😉

    You mean clicking the search box, then clicking away?

    If so, then it’s a known issue. It’s already been fixed in the upcoming version, which should be available for download within a week 😉
    It was because of an old compatibility code with internet explorer 7 – but it’s no longer needed.

    Best,
    Ernest Marcinko

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


    #3931

    That’s great, we’ll see the fix then.

    We have another question about the results.
    (1) if it finds a page (not a post) with the search keyword it doesn’t give a excerpt in the search result. Can we fix this? Try searching for “UWV” on our website and you we’ll see in the first results what we mean

    (2) If we click on the show more results, it brings us to the wordpress search (with or without turning the “overwrite wordpress result page”) and the results do not even come close to the results that were showed when searching. Do we have to create a specific page with the search results shortcode and redirect to that page in the settings?

    #3938
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Sorry for the late answer, I’ve been checking on the second issue, and I needed to ask on wp forums if there is any solution to that from a core developer.

    1. I see. Some of the posts doesn’t have content, but id does have excerpt. For now you can only select one field, but luckily I have made hook points for this, so a small code snippet can help you out:

    add_filter( 'asp_results', 'asp_excerpt_results', 1, 1 );
     
    function asp_excerpt_results( $results ) {
      foreach ($results as $k=>$v) {
        // Check the content and the excerpt
        if (($results[$k]->content == null
             || $results[$k]->content == ''
             || strlen($results[$k]->content) < 5)
             && ($results[$k]->excerpt != null
             && $results[$k]->excerpt != ''
             && strlen($results[$k]->excerpt) > 1)
            )
            $results[$k]->content = $results[$k]->excerpt;
      }
      return $results;
    }

    Try to add this code to your themes functions.php file. I haven’t got time to properly test, but it should work.

    2. This is lot more complicated unfortunately. The problem is that the override must use internal (wordpress core) functions to retrieve the posts by their id after the ajax search pro does the partial search. The problem with that particular function is, that it cannot retrieve posts from other multisite blogs. (I thought it does) I’ve contacted a developer to advise me with the issue, so I might be able to work out something.

    It will require you to replace 2-3 files, because I will probably need to change a few lines in them. Would you replace those files in the ajax search pro plugin if I attach them here?

    Best,
    Ernest Marcinko

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


    #3939

    Hi,

    not a problem. Take your time. Your support is great!

    1. I’ll test the code and see if it helps. The post and the content in the posts show as an excerpt in de results. But on our pages (which can have a excerpt) Have their content in shortcodes from our theme. So if we turn on the option within ajax to execute the shortcode the results give us the div names of the shortcode which isn’t the result you want to see. I hope your code works and gives a little bit of content.

    2. Ofcourse we’re capable of doing so. If we put the files in, and you have your update at the end of the week, are those files in them or is this just a fix for us?

    #3941
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    1. Ok, let me know 😉

    2. It’s going to be featured in the next update of course, if I’m able to do that fix. I’m not sure if I release the update this week yet, something came up and I have to travel to Germany thursday, so I won’t be available till monday.

    I will contact you either later today or tomorrow around morning with the modified files.

    Best,
    Ernest Marcinko

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


    #4061

    Hi Ernest,

    we’re still waiting on that fix. What happend?

    #4062
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Don’t worry, I havent forgot about you. The support forum is a bit busy, that’s why the delay. I’ve tried 2 different solutions, but so far none of them worked. Working on another one while I’m answering tickets and stuff. This is going to be solved, one way or the other.

    I’ll set up a reminder to contact you later today, hopefully with the solution.

    Best,
    Ernest Marcinko

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


    #4089
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Okay, I might have found a solution, so far it works for me on a 3 site network, but I’m not sure if it will work 100% properly for you too.

    1. Make a backup of your wp-content/plugins/ajax-search-pro folder, just in case.
    2. Extract the archive attached to this post
    3. There are 2 files in the extracted ajax-search-pro directory, one of them in the includes subdirectory.
    4. Copy the content from the extracted ajax-search-pro directory to your server into the wp-content/plugins/ajax-search-pro folder folder. The ftp program should ask to overwrite the 2 files.
    5. After copying try it.

    I hope this will finally work.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.