zeedesign_r
Forum Replies Created
-
Any chance that this fix could be added to the next update?
- This reply was modified 1 year ago by zeedesign_r.
I’ve updated the plugin, and the fields are indeed still filled after removing my fix. Thanks!
I do still get the notices after adding a new ACF field though, or wasn’t that fixed yet?
Notice: Array to string conversion in wp-content/plugins/acf-to-custom-database-tables/includes/class-acfct-database-manager.php on line 247 Notice: Array to string conversion in wp-content/plugins/acf-to-custom-database-tables/includes/class-acfct-database-manager.php on line 248
To be completely sure that it’s not a template or plugin problem, I’ve tried it out on a clean WP install.
I’ve added ACF + this plugin and created a basic child theme for twentytwentytwo WP theme. Then added my custom post type and the filter below:
add_filter('acf_ct/settings/store_acf_values_in_post_meta', '__return_false');
After creating/ saving the post, the values are added to the custom table, not added to the meta table (as expected because of the filter).
However, on reload of the post in admin, no acf fields show any values.Like I’ve said before, I have a fix for it via the acf/load_value filter. However, this seems like something that the plugin itself should do. Which is why I wonder if I’m missing something?
Below is the current fix that I’m using to load the values:
function zd_get_custom_table_column_value( $value, $post_id, $field ) { $groups = acf_get_field_groups(); $parent = array(); foreach ($groups as $key => $group) { if ($field["parent"] == $group["ID"]) { $parent = $group; } } if (!empty($parent) && isset($parent["acf_ct_enable"]) && !empty($parent["acf_ct_enable"]) && isset($parent["acf_ct_table_name"]) && !empty($parent["acf_ct_table_name"]) && isset($field["acf_ct_exclude_column"]) && ($field["acf_ct_exclude_column"] != 1 ) ) { $table = 'wp_'.$parent["acf_ct_table_name"]; $value = get_custom_table_field($table, $field["name"], $post_id); } return $value; } add_filter('acf/load_value', 'zd_get_custom_table_column_value', 10, 3);
– That’s just it, the data is available/ present in the custom table. But the ACF fields are empty after you create or update a post.
The data is not in the meta table, because of the added filter.
– This applies to all posts of this custom post type.
– Plugins shouldn’t be the issue, because the site only uses 2 Gravity Forms plugins/add-ons at the moment.Forum: Plugins
In reply to: [Yoast SEO] Breaks Divi BuilderWe’ve been having this exact same problem with all our Divi sites.
Divi theme 4.9.0 in combination with Yoast SEO 15.8 causes the Divi theme builder to break (it won’t save new templates).For now we’re going to rollback all Yoast plugins to version 15.7 which doesn’t seem to cause this problem.
Would love to know when this is fixed, because we use the Divi and Yoast combination a lot.