acf-fields-in-custom-table icon indicating copy to clipboard operation
acf-fields-in-custom-table copied to clipboard

Field Display Functions Do not work when Storage in WP_postmeta is Disabled

Open hmzisb opened this issue 3 years ago • 4 comments

Hey there, thank you for developing this plugin. I noticed that when I disable wp_postmeta data storage acf display functions stop working. I guess they fetch the data from wp_meta. Is there a way around to keep those functions working?

hmzisb avatar Aug 05 '21 10:08 hmzisb

Hi @hmzisb are you using the the ACF's default functions get_field and the_field?

eduardo-marcolino avatar Aug 16 '21 12:08 eduardo-marcolino

I have the same problem.

load_field_from_custom_table($value, $post_id, $field) parameters are just empty it seems. See the result below.

{"value":null,"post_id":null,"field":{"ID":0,"key":"","label":"","name":"xyz_field_name","prefix":"","type":"","value":null,"menu_order":0,"instructions":"","required":false,"id":"","class":"","conditional_logic":false,"parent":0,"wrapper":{"width":"","class":"","id":""},"_name":"xyz_field_name","_valid":1}}

JobMoll avatar Sep 27 '21 20:09 JobMoll

@hmzisb don't know if you need it but I wrote a super quick fix for it: https://github.com/JobMoll/acf-fields-in-custom-table

You do need to reinstall the plugin from here since I also add a custom options menu which it relies on.

JobMoll avatar Sep 27 '21 21:09 JobMoll

I can confirm this error, this is because the values seem to be stored twice, once in the meta table and once in the custom table, but it seems only to read from the meta table. @JobMoll your fork is not accessible.

Nowi5 avatar Oct 22 '21 20:10 Nowi5