polylang / wpml-to-polylang

Tool to migrate a WPML install to Polylang
https://wordpress.org/plugins/wpml-to-polylang/
GNU General Public License v3.0
6 stars 0 forks source link

PHP notice when running the WPML importer tool #5

Closed Chrystll closed 4 years ago

Chrystll commented 5 years ago

Plugins activated

WPML to Polylang 0.3 Polylang 2.6 WPML Multilingual CMS 4.2.7.1 WPML String Translation 2.10.5.1 WPML Media 2.5.2

Issue description

After running the WPML importer tool I get a PHP notice, see:

PHP Notice:  Undefined offset: 12 in /wordpress/wp-content/plugins/wpml-to-polylang-master/wpml-to-polylang.php on line 341
PHP Stack trace:
PHP   1. {main}() /wordpress/wp-admin/admin.php:0
PHP   2. do_action() /wordpress/wp-admin/admin.php:253
PHP   3. WP_Hook->do_action() /wordpress/wp-includes/plugin.php:465
PHP   4. WP_Hook->apply_filters() /wordpress/wp-includes/class-wp-hook.php:310
PHP   5. WPML_To_Polylang->tools_page() /wordpress/wp-includes/class-wp-hook.php:286
PHP   6. WPML_To_Polylang->import() /wordpress/wp-content/plugins/wpml-to-polylang-master/wpml-to-polylang.php:96
PHP   7. WPML_To_Polylang->process_post_term_translations() /wordpress/wp-content/plugins/wpml-to-polylang-master/wpml-to-polylang.php:204
PHP Notice:  Trying to get property 'term_id' of non-object in /wordpress/wp-content/plugins/wpml-to-polylang-master/wpml-to-polylang.php on line 341
PHP Stack trace:
PHP   1. {main}() /wordpress/wp-admin/admin.php:0
PHP   2. do_action() /wordpress/wp-admin/admin.php:253
PHP   3. WP_Hook->do_action() /wordpress/wp-includes/plugin.php:465
PHP   4. WP_Hook->apply_filters() /wordpress/wp-includes/class-wp-hook.php:310
PHP   5. WPML_To_Polylang->tools_page() /wordpress/wp-includes/class-wp-hook.php:286
PHP   6. WPML_To_Polylang->import() /wordpress/wp-content/plugins/wpml-to-polylang-master/wpml-to-polylang.php:96
PHP   7. WPML_To_Polylang->process_post_term_translations() /wordpress/wp-content/plugins/wpml-to-polylang-master/wpml-to-polylang.php:204
Chouby commented 5 years ago

This seems to be due to ghost data in the icl_translations table (translations information related to non existing nav menus).