• I’ve imported woocommerce product with Product CSV Import Suite plugin. Each product gets acf fields.

    I import the meta search_content = “cookie” and _search_content = field_123456789 for exemple.

    But custom fields are added to wp_postmeta table with new post_id auto incremented 10 by 10 rather than 1 by 1. The effect is that ACF Better search is unable to find key word “cookie”.

    I’ve tried to change directly in database post_id to get two meta_id witch are following. And then the search request on “cookie” works.

    Is it a normal behavior ? How can I “force” the search ?

    Thank you for the help.

    • This topic was modified 7 years, 9 months ago by Concept Image.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Concept Image

    (@devci)

    I’m still investigate on this issue.
    When I display the sql request I can see this:
    b.meta_id = a.meta_id + 1

    I think it support my previous comment about database auto_increment range.
    Is there any reason to have this behavior ?
    Post_id and meta_value are they not enough for the request ?

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    This is a very important element of SQL query. With it, you can associate the ACF field with its settings.

    IDs must go after the other. Otherwise you will not handle it.

    Thread Starter Concept Image

    (@devci)

    Thank you for the reply.

    However, I can’t change the database settings. So, each time a new meta is created, associated meta_id are separated by 10.
    So it couldn’t work.

    To associate the ACF fields meta the link are post_id and meta_key:

    Exemple:
    post_id = 18952 / meta_key = search_content_extra
    post_id = 18952 / meta_key = _search_content_extra

    I can’t get how the query work exactly.
    Is there an other table involve in the request ?

    Even if the auto increment range change now, I won’t be able to change already saved meta.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Unfortunately. I am not able to help you. ID values in wp_postmeta must increase by 1.

    Thread Starter Concept Image

    (@devci)

    Ok thank you for your help.
    I’ll try to find an other solution so.

    Can you simply indicate me if this requirement is specific to your plugin or if it’s a wordpress one ?

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    All WP work like this. You have a non-standard setting.

    Thread Starter Concept Image

    (@devci)

    Ok, thank you.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @devci,

    I made an update in which there is a change to automatic detection of AUTO_INCREMENT field. Please download the latest update and let us know if this solved the problem.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Importing .csv product with ACF field’ is closed to new replies.