• Resolved Andreas 2013

    (@andreas-2013)


    Hello and thank you for the plugin!
    I’ve just installed it to see if it works with my ACF field group in wordpress backend, for what I’m trying to do. Unfortunately it doesn’t seem so.

    I have a custom post type named ‘person’ with thousands of entries. I’ve created my new table successful via your plugin, but the table is still empty. I saved a page from my custom post type without modifying something. Nothing happens. Only when I edit a custom field and save the post, then the plugin generates an entry to the new table. That means, I have to find a way to transfer existing field values to the new table. I’ve got the plugin WP All Import, maybe it works with this plugin?

    But the actual problem is this: On my website I’m usually working with scripts, to generate the entries in the table automatically. To test the plugin if it works, I opened the new table with phpMyAdmin, modified a value of a field and saved the table. Then I opened the corresponding page in wordpress backend to see, if the value has changed. Unfortunately nothing happened, the value is still the old one.
    When I change the value in wordpress backend and save the post, the value in the database table is changing, too. But when I try to edit values in the opposite way directly in the database table, it doesn’t effect the wordpress backend and ACF.

    Do you have an explanation for this problem? Thank you very much in advance!
    Andreas

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter Andreas 2013

    (@andreas-2013)

    Edit: I’ve just noticed, that the custom-field-values in the wordpress backend are still read from / written to the wp-core-table “wp_postmeta”. In this case it seems, that the values in the new generated table are only a duplicate without function.

    Plugin Author Abhishek

    (@abhisheksatre)

    Hi,
    To keep your ACF data compatible with other plugins, by default the plugin saves ACF field data in the wp_postmeta table along with a custom table. You can disable this behavior using the following filter.

    add_filter('acf_ct/settings/store_acf_values_in_post_meta', '__return_false');

    https://acf-custom-tables.abhisheksatre.com/docs/filters/acf_ct-settings-store_acf_values_in_post_meta

    Thread Starter Andreas 2013

    (@andreas-2013)

    Hi Abhishek,
    thanks for your reply!

    The problem is, that my new created table “wp_acfcustomtable” isn’t working at all. All values are still read from the original wp-table “wp_postmeta”, not from my new table.

    I made a test: when I change a value directly in the “wp_postmeta”, the field is changing in the wordpress frontend-page! When I change it in “wp_acfcustomtable”, nothing happens.
    By the way, I’ve added your mentioned line of code into my functions.php, but with no effect.

    Thread Starter Andreas 2013

    (@andreas-2013)

    Hi Abhishek,
    everything is working now!
    Thank you very much for your help 🙂

    Hey, what was the solution to this issue? I’m experiencing the same problem.

    Thread Starter Andreas 2013

    (@andreas-2013)

    Unfortunately the problem still exists. I’m trying to find a solution without this plugin.

    Thanks, won’t be able to use it then as I need the database to update directly to the post. Thank you for the feedback.

    Plugin Author Abhishek

    (@abhisheksatre)

    Hi @ccawcutt,

    This plugin stores ACF data in a custom table. If you manually update the data in the database it will be reflected in the post

    If you face any problem please let me know. I am happy to help.

    I tried updating it in the nee custom table in the database and it didn’t update the post. And by using your function supplied above it also stops me being able to save changes in the post through the admin panel.

    Is there another fix?

    Plugin Author Abhishek

    (@abhisheksatre)

    Is it happening for all field types or a specific field?

    Which version of Advanced Custom Fields are you using?

    It seems like a third-party plugin/code is interfering with the process. Is it possible to share a screen recording or get on a zoom call? (My email: hi @ abhisheksatre.com)

    Thanks, will email you

    hi!
    i create custom fields it was working fine and now only date field not getting saved…please help

    Hi,

    Newly added data gets updated perfectly but I already have tons of data in my Custom Post Type. Is there any easy way to update the existing data to the Custom Tables?

    Thanks

    Plugin Author Abhishek

    (@abhisheksatre)

    Hi @devtestconcise,

    Currently, the plugin does not have a migration feature. We are working on a tool to migrate ACF data to a custom table.

    An alternate solution:
    1. Export acf data using the export plugin. While exporting add post id as a post_id column
    2. Open exported CSV and verify CSV columns with custom table column names.
    3. Import this CSV into the custom table using any database GUI.

    OK, thank you

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Editing custom field value in database table?’ is closed to new replies.