This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by Shekhar Bhandari 5 months ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
May 8, 2019 at 7:27 pm #3770511

ryanP-9

Hi,

Following up on an earlier thread regarding using the Polylang to WPML tool:
https://wpml.org/forums/topic/migrate-from-polylang-to-wpml-error-failed-to-load-resource-admin-ajax/

I'm in the process of actually launching the site in question and I'm seeing a completely different error while attempting to translate the site from Polylang to WPML. See below:

---------------------------------

[08-May-2019 19:14:22 UTC] PHP Fatal error: Uncaught InvalidArgumentException: element_id and type do not match for element_id:en the database contains post_tribe_events while this function was called with post_tribe_organizer in C:\inetpub\wp\wp-content\plugins\sitepress-multilingual-cms\classes\core-abstract-classes\class-wpml-set-language.php:32
Stack trace:
#0 C:\inetpub\wp\wp-content\plugins\sitepress-multilingual-cms\sitepress.class.php(1483): WPML_Set_Language->set('en', 'post_tribe_orga...', '64407', 'language_code', 'en', true)
#1 C:\inetpub\wp\wp-content\plugins\sitepress-multilingual-cms\sitepress.class.php(1452): SitePress->set_element_language_details('en', 'post_tribe_orga...', '64407', 'language_code', 'en', true)
#2 C:\inetpub\wp\wp-includes\class-wp-hook.php(286): SitePress->set_element_language_details_action(Array)
#3 C:\inetpub\wp\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#4 C:\inetpub\wp\wp-includes\plugin.php(453): WP_Hook->do_action(Array)
#5 C:\inetpub\wp\wp-content\plugins\migrate-polylang-to-wpml-ma in C:\inetpub\wp\wp-content\plugins\sitepress-multilingual-cms\classes\core-abstract-classes\class-wpml-set-language.php on line 32

---------------------------------

I've tried updating php.ini + restarting the server, wiping the WPML cache and resetting it back to defaults - none of these options seem to resolve the issue.

Any idea what else I might be able to try?

May 9, 2019 at 3:40 am #3772763

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Welcome to WPML support. I'd be assisting you further on this issue.

It seems like there are some entries in the databases that are not inserted properly, so could you please follow the below steps and let me know if this helps?

- Backup your database
- Login to your phpmyadmin
- Go to {wp_prefix}_icl_translations table and search for 'en' in element_id column
- Delete that entry, it probably should be only 2-3 entries, if there are more entries, please don't delete it and update us here.
- Refresh the migration.

Let me know if this helps.

Thanks

May 13, 2019 at 9:00 pm #3801547

ryanP-9

Hi Shekhar,

This particular site is client-hosted, which I access through their server via Remote Desktop - I'm not entirely sure how to access their phpMyAdmin, as it sounds like the port typically used by localhost/phpmyadmin is currently being used by something else they have running, so navigating there in a browser just throws an Error 404 page.

I tried changing the default port for the config.ini.php file to get around this, but it doesn't seem to have had any effect. The rest of these instructions seem pretty straightfoward - any thoughts on how I might resolve accessing phpMyAdmin?

May 14, 2019 at 3:43 am #3803229

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

You can ask if the client can provide access to phpmyadmin, this is the only way to access it. We are trying to access phpmyadmin to make changes to there database, so if you have any other way to access the MySQL database it will be ok.

Else, you can also try to use the adminer hidden link

Let me know if this helps.

Thanks

The topic ‘[Closed] PolyLang to WPML – PHP Fatal error: Uncaught InvalidArgumentException’ is closed to new replies.