admin管理员组文章数量:1130349
After upgrading Wordpress and associated plugins to the latest version on a dev server and migrating the source files and database to the production server, the data from ACF is different.
prod and dev server (dev is a Vagrant clone of prod)
CentOS 6.9
Apache 2.4
PHP 5.6 (php-fpm using mod_proxy_fcgi)
MySQL 5.7
DocRoot: /home/user/example
Upgrades:
Wordpress: 3.8.4 => 4.9.8
ACF: 4.4.12 => 5.7.7
ACF Repeater: 1.0.1 => 2.1.0
ACF Page Options: 1.0.1 => 2.1.0
UPDATE (removed unneeded information)
I managed to migrate the data with WP_CRON disabled. After I re-enabled WP_CRON, I encounter the issue with the data.
Looking at the data operations when manually executing wp-cron.php, I've determined that the issue is caused by wp_split_shared_term_batch.
Comparing the wp_options, wp_terms and wp_taxonomy tables from before and after running wp-cron.php shows a lot of changes with the ACF data.
- Assigns a different
term_idandparentin thewp_taxonomytable. - Removes and changes multiple ACF values in
wp_options - Adds a new
_split_termsrow inwp_options - Duplicated multiple values in
wp_terms
After upgrading Wordpress and associated plugins to the latest version on a dev server and migrating the source files and database to the production server, the data from ACF is different.
prod and dev server (dev is a Vagrant clone of prod)
CentOS 6.9
Apache 2.4
PHP 5.6 (php-fpm using mod_proxy_fcgi)
MySQL 5.7
DocRoot: /home/user/example
Upgrades:
Wordpress: 3.8.4 => 4.9.8
ACF: 4.4.12 => 5.7.7
ACF Repeater: 1.0.1 => 2.1.0
ACF Page Options: 1.0.1 => 2.1.0
UPDATE (removed unneeded information)
I managed to migrate the data with WP_CRON disabled. After I re-enabled WP_CRON, I encounter the issue with the data.
Looking at the data operations when manually executing wp-cron.php, I've determined that the issue is caused by wp_split_shared_term_batch.
Comparing the wp_options, wp_terms and wp_taxonomy tables from before and after running wp-cron.php shows a lot of changes with the ACF data.
- Assigns a different
term_idandparentin thewp_taxonomytable. - Removes and changes multiple ACF values in
wp_options - Adds a new
_split_termsrow inwp_options - Duplicated multiple values in
wp_terms
1 Answer
Reset to default 0After attempting many upgrades of various WP and ACF versions, I have concluded that WP 3.8 to 4.2 with ACF 4 data can not be upgraded to WP 4.3+ withACF 5.
Reason
WP 4.3 introduced a feature called split_shared_term, which affects the data used by ACF 5. ACF 4 stores the data in a manner that is re-indexed by the WP 4.3+ term splitting once it is upgraded to ACF 5. Resulting in ACF being unable to find the assigned indexes of those split terms.
I believe this is an issue with the ACF 5 database upgrade, not fully accounting for the split terms that WP 4.3+ will create from the ACF 4 data.
I have reached out to the ACF support team regarding the issue, with a general response on how the upgrade to ACF 5 may not have completed fully or an error occurred. As per their suggestion by changing the ACF version in the wp_options table and forcibly running the database upgrade again, results in duplicate data, but still invalid index references.
I managed to find a plugin that seems to mitigate the issue in ACF 4 when upgrading from WP 4.0 to 4.3, but does not work for ACF 5. The plugin is called acf-split-terms on github.
For more details about the split terms, please see https://make.wordpress/core/2015/02/16/taxonomy-term-splitting-in-4-2-a-developer-guide/
After upgrading Wordpress and associated plugins to the latest version on a dev server and migrating the source files and database to the production server, the data from ACF is different.
prod and dev server (dev is a Vagrant clone of prod)
CentOS 6.9
Apache 2.4
PHP 5.6 (php-fpm using mod_proxy_fcgi)
MySQL 5.7
DocRoot: /home/user/example
Upgrades:
Wordpress: 3.8.4 => 4.9.8
ACF: 4.4.12 => 5.7.7
ACF Repeater: 1.0.1 => 2.1.0
ACF Page Options: 1.0.1 => 2.1.0
UPDATE (removed unneeded information)
I managed to migrate the data with WP_CRON disabled. After I re-enabled WP_CRON, I encounter the issue with the data.
Looking at the data operations when manually executing wp-cron.php, I've determined that the issue is caused by wp_split_shared_term_batch.
Comparing the wp_options, wp_terms and wp_taxonomy tables from before and after running wp-cron.php shows a lot of changes with the ACF data.
- Assigns a different
term_idandparentin thewp_taxonomytable. - Removes and changes multiple ACF values in
wp_options - Adds a new
_split_termsrow inwp_options - Duplicated multiple values in
wp_terms
After upgrading Wordpress and associated plugins to the latest version on a dev server and migrating the source files and database to the production server, the data from ACF is different.
prod and dev server (dev is a Vagrant clone of prod)
CentOS 6.9
Apache 2.4
PHP 5.6 (php-fpm using mod_proxy_fcgi)
MySQL 5.7
DocRoot: /home/user/example
Upgrades:
Wordpress: 3.8.4 => 4.9.8
ACF: 4.4.12 => 5.7.7
ACF Repeater: 1.0.1 => 2.1.0
ACF Page Options: 1.0.1 => 2.1.0
UPDATE (removed unneeded information)
I managed to migrate the data with WP_CRON disabled. After I re-enabled WP_CRON, I encounter the issue with the data.
Looking at the data operations when manually executing wp-cron.php, I've determined that the issue is caused by wp_split_shared_term_batch.
Comparing the wp_options, wp_terms and wp_taxonomy tables from before and after running wp-cron.php shows a lot of changes with the ACF data.
- Assigns a different
term_idandparentin thewp_taxonomytable. - Removes and changes multiple ACF values in
wp_options - Adds a new
_split_termsrow inwp_options - Duplicated multiple values in
wp_terms
1 Answer
Reset to default 0After attempting many upgrades of various WP and ACF versions, I have concluded that WP 3.8 to 4.2 with ACF 4 data can not be upgraded to WP 4.3+ withACF 5.
Reason
WP 4.3 introduced a feature called split_shared_term, which affects the data used by ACF 5. ACF 4 stores the data in a manner that is re-indexed by the WP 4.3+ term splitting once it is upgraded to ACF 5. Resulting in ACF being unable to find the assigned indexes of those split terms.
I believe this is an issue with the ACF 5 database upgrade, not fully accounting for the split terms that WP 4.3+ will create from the ACF 4 data.
I have reached out to the ACF support team regarding the issue, with a general response on how the upgrade to ACF 5 may not have completed fully or an error occurred. As per their suggestion by changing the ACF version in the wp_options table and forcibly running the database upgrade again, results in duplicate data, but still invalid index references.
I managed to find a plugin that seems to mitigate the issue in ACF 4 when upgrading from WP 4.0 to 4.3, but does not work for ACF 5. The plugin is called acf-split-terms on github.
For more details about the split terms, please see https://make.wordpress/core/2015/02/16/taxonomy-term-splitting-in-4-2-a-developer-guide/
本文标签: advanced custom fieldswpsplitsharedtermbatch messing up upgraded ACF 5 data
版权声明:本文标题:advanced custom fields - wp_split_shared_term_batch messing up upgraded ACF 5 data 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749215556a2334097.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论