Migration Issues - WPML

This is a new thread. I managed to resolve the issue with the custom font plugin by updating the code.

I then attempted to run the migration again. This time it doesn’t have errors for the custom font plugin but it now fails with WPML errors.

[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 84
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 84
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 114
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 138
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 147
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “post_content” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 48
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 49
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/AutoUpdate/Hooks.php on line 80
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “post_title” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 62
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “post_excerpt” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php on line 62
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “post_type” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php on line 70
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php on line 70
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “post_title” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php on line 71
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “post_title” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php on line 74
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “post_content” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php on line 75
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “post_excerpt” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php on line 76
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php on line 83
[06-Mar-2025 07:34:26 UTC] PHP Warning: Attempt to read property “ID” on null in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php on line 329
[06-Mar-2025 07:34:26 UTC] PHP Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, false given in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php:329
Stack trace:
#0 /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php(329): array_filter()
#1 /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php(88): WPML_Element_Translation_Package->add_custom_field_contents()
#2 /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php(13): WPML_Element_Translation_Package->create_translation_package()
#3 /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-post-actions.class.php(72): WPML_TM_Action_Helper->create_translation_package()
#4 /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php(949): WPML_TM_Post_Actions->save_post_actions()
#5 /var/www/test.co.za/public_html/wp-includes/class-wp-hook.php(324): wpml_tm_save_post()
#6 /var/www/test.co.za/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#7 /var/www/test.co.za/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#8 /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-translation.class.php(213): do_action()
#9 /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-admin-post-actions.class.php(123): WPML_Post_Translation->after_save_post()
#10 /var/www/test.co.za/public_html/wp-includes/class-wp-hook.php(326): WPML_Admin_Post_Actions->save_post_actions()
#11 /var/www/test.co.za/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#12 /var/www/test.co.za/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#13 /var/www/test.co.za/public_html/wp-includes/post.php(5060): do_action()
#14 /var/www/test.co.za/public_html/wp-includes/post.php(5162): wp_insert_post()
#15 /var/www/test.co.za/public_html/wp-content/themes/pro/cornerstone/includes/classes/Documents/Content.php(419): wp_update_post()
#16 /var/www/test.co.za/public_html/wp-content/themes/pro/cornerstone/includes/integration/html-storage.php(83): Themeco\Cornerstone\Documents\Content->updateElements()
#17 /var/www/test.co.za/public_html/wp-content/themes/pro/cornerstone/includes/integration/html-storage.php(132): cs_content_storage_migrate()
#18 /var/www/test.co.za/public_html/wp-content/themes/pro/cornerstone/includes/classes/Util/AdminAjax.php(60): Themeco\Cornerstone\Plugin->{closure}()
#19 /var/www/test.co.za/public_html/wp-includes/class-wp-hook.php(324): Themeco\Cornerstone\Util\AdminAjax->handler()
#20 /var/www/test.co.za/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#21 /var/www/test.co.za/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#22 /var/www/test.co.za/public_html/wp-admin/admin-ajax.php(192): do_action()
#23 {main}
thrown in /var/www/test.co.za/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php on line 329

This one wasn’t happening to me in my WPML site. You might have to send me the site and you might have to have WPML take a look at this. What other plugins are on this site besides WPML?

@charlie it seems like your migration is triggering other items.

By example, the plugin Cornerstone Custom Font plugin that had issues had this code.

       public function init() {

		$action = cc_icons_manager()->getRequest( 'action', 'cc_icons_save_font' );

		add_action( 'wp_ajax_' . $action, array( $this, $action ) );

	} 

The above dynamically creates:

            add_action('wp_ajax_cc_icons_save_font', [$this, 'cc_icons_save_font']);
	add_action('wp_ajax_cc_icons_delete_font', [$this, 'cc_icons_delete_font']);
	add_action('wp_ajax_cc_icons_regenerate', [$this, 'cc_icons_regenerate']);

When the migration ran it set $action to ‘cs_document_storage_migrate’ and triggered the action . As this function didn’t exist in the class it caused an error. To fix it, as it was the easiest, I just added a condition.

       public function init() {

		$action = cc_icons_manager()->getRequest( 'action', 'cc_icons_save_font' );

		// error_log('Action: ' . $action);

		// ajax events
		if ($action !== 'cs_document_storage_migrate') {
			add_action( 'wp_ajax_' . $action, array( $this, $action ) );
		}

	}

The site is an older one that uses The Grid. As Theme.co stopped pushing updates for the Grid it is stuck on an old version. Running the migration also throws a ton of errors with the Grid plugin.

Interestingly enough I’ve run the migration again with this WPML site and got the same error but I just kept hitting the migrate button again each time it failed. The migration finally completed although I had to restart it multiple times.

My concern is (1) if I click migrate again does it start from the beginning or from where it left off? and (2) what happens in migration at the point of failure? and (3) what is the reason it would fail and then upon migrating again the failure does not occur at that point. Finally will this cause issues somewhere in page that we aren’t aware of?

The WPML error is always the same. The one I am testing on is an internal local development server. I can’t give access to the live site but I could potentially create a version of the site somewhere that I could provide access to. Let me know if it will be usefull.

  1. It starts from the beginning if you have to restart it. However it if sees there is already CS HTML, then it skips the post.
  2. Whatever Post created the failure won’t be converted and all subsequent posts will not be migrated. You might have a situation where certain posts are converted and some are not, but that shouldn’t be an issue for your frontend.
  3. A thought here, could be there was some action a plugin does on a certain time frame, but not all the time. That could be a number of things though.

Let me know if that helps clears things up.

Thanks for getting back to me. I don’t think there are any actions from a plugin. (Plugins are basically ACF, Facet WP, GTM4WP - deactivated, Classic Editor, CF7, SafeSVG, The Grid, WPML, WP All Import - no automated imports, UpdraftPlus, Snippet, on the live site WordFence but not on the test site and WP Fastest Cache)

So basically there were about 3000 elements that required migrating.

The first failure was at about 60 elements. If I clicked migrate again then the migrate started again and got past 60 elements but then failed at about 200 elements. I simply clicked migrate again and each time it would go slightly further until it was finally finished.

Each time the migration failed I had the exact same error in the error log. i.e. a bunch of null ids and then a fatal error.

I presume from what you are saying that my migration is complete and any new pages would use HTML storage however the pages that failed and were then possibly skipped over my have some shortcode storage.

You say this is fine. The last question I have is will you always support the shortcode storage or will it eventually be removed?