Index doesn't find all Custom Fields from "GeoDirectory"

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Index doesn't find all Custom Fields from "GeoDirectory"

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #31683
    braino65
    braino65
    Participant

    Hi Ernest!

    I struggle indexing all Custom Fields from GeoDirectory. some custom fields are found but most of them are not. I even use those custom fields in the global-divi-builder so I know that they (should) work but when I am trying to Index most of the custom fields, AjaxSearchPro is telling me that it doesn’t find any of the fields. Here is an example:

    List of fields: /wp-admin/edit.php?post_type=gd_jobs&page=gd_jobs-settings

    Link to AjaxSearchPro index: /wp-admin/admin.php?page=asp_index_table

    Link to AjaxSearchPro custom fields: /wp-admin/admin.php?page=asp_settings&asp_sid=9#303
    This shortcode displays this frontend: /jobs/

    What I am trying to achieve in the frontend is to have a location selection and the following fields:
    – x
    – y
    – Category (this is already implemented)

    #31693
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    If the fields does not show up in the list when you are searching for them, that means they simply does not exist for sure in the wp_postmeta table. There are multiple reasons that could happen:
    1. if the field is not in use yet: no values have been assigned to it on a post/post type object. Once there is at least one post/cpt with a field value it will show up
    2. the actual field name is different from the label name
    3. the field is not actually a post meta field, but stored in a different table

    In case of issue 1. you start using the field, and it should appear sooner or later. With issue 2. you may have to look around or ask the developer if there is a way to get the actual post meta field name. In ACF for example you can see the “slug” field, which is actually the custom field name.
    With issue 3. there is nothing we can do unfortunately – if the values are stored extrernally there is no way for the plugin to access them.

    Best,
    Ernest Marcinko

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


    #31701
    braino65
    braino65
    Participant

    Thank you for your reply. Are you sure about the wp_postmeta? Because i wasn’t able to find anstellungsform inside it when i opened phpmyadmin and it still was found in ASP

    #31709
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Yes, I run a test query via FTP on the back-end to make sure it is not a mistake.
    The query executed via the database handler was:

    "SELECT DISTINCT(meta_key) FROM nhvgy_postmeta WHERE (meta_key LIKE '%%anstellungsform%%')"

    and there was only one result for that:

    array(1) {
      [0]=>
      object(stdClass)#34666 (1) {
        ["meta_key"]=>
        string(21) "field_anstellungsform"
      }
    }

    Which is the field name field_anstellungsform
    It appears to be correct, the field search query returns the same. Try running the same query on phpMyAdmin, and it should return the same result as well.

    You can however enter whatever you want to the field name input, the search feature is only there to help you to find existing fields.

    Best,
    Ernest Marcinko

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


    #31761
    braino65
    braino65
    Participant

    GeoDirectory just replied with their support. This is what they said:

    “it’s n 3. Custom fields are store in custom DB tables for scalability purposes.”

    So my question is now: What can I do now? What are my options?

    #31770
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Well that is very unfortunate. There is not much we can do about that. To access data from an external DB table and use them for filters – that needs major customizations, both on the front and the back-end, as well as the queries need to be implemented etc..
    You can try asking a developer, but it might be cheaper to simply create a completely custom made plugin for this exact purpose.

    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.