AFC and Ajax Search Pro – Filter & Search Problems

Home Forums Product Support Forums Ajax Search Pro for WordPress Support AFC and Ajax Search Pro – Filter & Search Problems

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #36465
    omkb78
    omkb78
    Participant

    Hello,

    we do have some problems with Ajax Search Pro and ACF. We using ACF a lot, and need Ajax Search Pro to work good with ACF.

    1) Check omkb.de/videos – If you use the filter for “Unternehmen” for example, if you choose “AB Tasty” it will show you one result. But if you search the page for “AB Tasty”, you will get two results. We don’t get it. The ACF field does include “AB Tasty” in booth cases. We see this problem at some other points too, that the filter are just not working good enough. Even with Categories, which are not ACF fields, we get some errors.

    2) If you use the search on the page. There is some case, when the picture is not shown right. Search is just showing another picture. I can’t say why.

    Can you help me?

    Best

    #36486
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    1. That means, that the word “AB” and “Tasty” are matched in either some other selected field (like title, content, excerpt, taxonomy terms etc..).
    When I click the second result, I can already see multiple matches for both keywords: https://i.imgur.com/scbjjLu.png

    2. I tried the search phrase “AB Tasty” and the second result is pointing to this image URL: https://omkb.de/wp-content/uploads/2021/08/reviews-logo-fallback.png
    ..this URL goes to a blank 404 page. Check if the featured image is set correctly, as it seems that this file does not exist. The plugin requests the image from WordPress core, and the first default source is the featured image, so I assume that is set incorrectly.
    You can also change the image sources as you wish: https://documentation.ajaxsearchpro.com/general-settings/image-options

    Best,
    Ernest Marcinko

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


    #36493
    omkb78
    omkb78
    Participant

    Hello, we use this Script:

    function acf_set_featured_image( $value, $post_id, $field ){

    if($value != ”){
    //Add the value which is the image ID to the _thumbnail_id meta data for the current post
    delete_post_thumbnail( $post_id);
    add_post_meta($post_id, ‘_thumbnail_id’, $value);
    }

    return $value;
    }

    // acf/update_value/name={$field_name} – filter for a specific field based on it’s name
    add_filter(‘acf/update_value/name=logo’, ‘acf_set_featured_image’, 10, 3);
    add_filter(‘acf/update_value/name=speaker_bild’, ‘acf_set_featured_image’, 10, 3);
    add_filter(‘acf/update_value/name=image’, ‘acf_set_featured_image’, 10, 3);
    add_filter(‘acf/update_value/name=speaker_bild_in_video’, ‘acf_set_featured_image’, 10, 3);

    #36494
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Okay, so that I can imagine cause the issue, as the featured image is still set, but points to a non-existing file.

    Try this configuration then: https://i.imgur.com/YlOYh3g.png

    Best,
    Ernest Marcinko

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


    #36495
    omkb78
    omkb78
    Participant

    We have fixed the image (path was not set right in AJAX Pro) and setup the configuration as you described. Problem still is there.

    #36496
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    – What search phrase should I test for to see missing images?
    – Can you please link to a post where the image should be present?
    – Can you please add temporary (s)FTP and back-end details, so we can debug the code if neccessary and check the configuration?

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.