Search can't find certain documents and parent posts

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search can't find certain documents and parent posts

This topic contains 29 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 years, 10 months ago.

Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
    Posts
  • #27170
    AdditiveFX
    AdditiveFX
    Participant
    You cannot access this content.
    #27199
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Screenshots may work. Can you screenshot all tabs under General Options, Frondend search settings and Advanced panel?

    Best,
    Ernest Marcinko

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


    #27293
    AdditiveFX
    AdditiveFX
    Participant
    You cannot access this content.
    #27320
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thank you!

    This looks perfectly fine to me. Is there any custom code used regarding the plugin (filters, hooks etc..). I honestly don’t know how some of these results are missing, the query must match them for sure, with this configuration. The only thing I can think of, if there is any custom code, it might fiddle with the output.

    Just to test: Can you please create a new search instance, then go to it’s settings and only change these options:
    – Disable CPT search: https://i.imgur.com/XTJdQjC.png
    – Enable Attachment search: https://i.imgur.com/0OpyXje.png
    Now please save it, then open the preview and try searching “noroviren”, and then “bestellforumlar” as well. Is there any difference?

    Best,
    Ernest Marcinko

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


    #27322
    AdditiveFX
    AdditiveFX
    Participant
    You cannot access this content.
    #27325
    AdditiveFX
    AdditiveFX
    Participant
    You cannot access this content.
    #27354
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Are these attachments actually in the Media Library, can you find them there? Their location does not matter, as long as they are there registered.

    Best,
    Ernest Marcinko

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


    #27380
    AdditiveFX
    AdditiveFX
    Participant

    Yes they are in the media library.

    #27393
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


    #27408
    AdditiveFX
    AdditiveFX
    Participant

    Hey, yep I can do that! Appreciate your hel.

    #27413
    AdditiveFX
    AdditiveFX
    Participant
    You cannot access this content.
    #27434
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


    #27457
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I have found a custom code in your theme functions.php file, which removes unlinked attachments from the search results – this is causing the problem:

    /*FILTER AJAX SEARCH PRO RESULTS SO UNLINKED ATTACHMENTS DONT SHOW UP*/
    add_filter('asp_results', 'asp_results_remove_unlinked_attachments');
    function asp_results_remove_unlinked_attachments($results) {
        foreach ($results as $k=>&$r) {
            if ( isset($r->post_type) && $r->post_type == 'attachment' ) {
    			$parent_id = wp_get_post_parent_id( $r->id );
                if ( is_wp_error($parent_id) || empty($parent_id) ) {
                    // Remove the post from the results list	
    				unset($results[$k]);
    			}
            }
        }
    	return $results;	
    }

    The missing results does not have parent posts, only simple media elements, and this custom code is removing them. Removing this custom code should resolve the issues.

    Best,
    Ernest Marcinko

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


    #27460
    AdditiveFX
    AdditiveFX
    Participant
    You cannot access this content.
    #27461
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


Viewing 15 posts - 16 through 30 (of 30 total)

You must be logged in to reply to this topic.