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 10 replies, has 2 voices.

Last updated by Mihai Apetrei 12 months ago.

Assigned support staff: Mihai Apetrei.

Author Posts
October 11, 2018 at 10:33 am

nikosM-6

I've installed the WPML plugin using the .rar file just after purchased.

After activation, instantly the site goes down (404 error) and WP-admin is not reachable (500 error)

I deleted the plugin files through ftp, and everything got recovered. then after i re-install the plugin, same errors appear.

For now, everything is restored on previous state (before installing/activating the plugin)

Can you help to set this up efficiently?

thank you

October 11, 2018 at 5:18 pm #2809276

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi and thank you for contacting WPML Support!

I will be happy to help you with this.

I would need to see the detail of the error log. You can see how to enable debug logging here:
https://wpml.org/documentation/support/debugging-wpml/

Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);

Edit your wp-config.php file and add these lines, just before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

Now please go again over the same process and try installing WPML. It should now display at least one of the reasons that's causing the 500 error.

This will create an error_log.txt file in your site's root directory. Please send me its contents.

I will be waiting for your answer.

October 11, 2018 at 7:35 pm #2809622

nikosM-6

Hello,

I've opened wp-config.php file and when i search there is no line indicating to debug.

Is it possible that you use the ftp details /wp-admin details I sent in this ticket to achieve this? I would really appreciate it, considering my lack of knowledge on this part.

thanks

October 12, 2018 at 7:17 am #2810944

nikosM-6

Hello,

I managed to manually define the debugger. here are the error logs:

[12-Oct-2018 07:11:19 UTC] PHP Fatal error:  Uncaught exception 'InvalidArgumentException' with message 'element_id and type do not match for element_id:20 the database contains tax_category while this function was called with tax_nav_menu' in /nas/content/live/a66markets/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:28
Stack trace:
#0 /nas/content/live/a66markets/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1466): WPML_Set_Language->set('20', 'tax_nav_menu', NULL, 'en', NULL, true)
#1 /nas/content/live/a66markets/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(191): SitePress->set_element_language_details('20', 'tax_nav_menu', NULL, 'en')
#2 /nas/content/live/a66markets/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(78): WPML_Nav_Menu->_set_menus_language()
#3 [internal function]: WPML_Nav_Menu->init('')
#4 /nas/content/live/a66markets/wp-includes/class-wp-hook.php(286): call_user_func_array(Array in /nas/content/live/a66markets/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 28
[12-Oct-2018 07:11:34 UTC] PHP Fatal error:  Uncaught exception 'InvalidArgumentException' with message 'element_id and type do not match for element_id:20 the database contains tax_category while this function was called with tax_nav_menu' in /nas/content/live/a66markets/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:28
Stack trace:
#0 /nas/content/live/a66markets/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1466): WPML_Set_Language->set('20', 'tax_nav_menu', NULL, 'en', NULL, true)
#1 /nas/content/live/a66markets/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(191): SitePress->set_element_language_details('20', 'tax_nav_menu', NULL, 'en')
#2 /nas/content/live/a66markets/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(78): WPML_Nav_Menu->_set_menus_language()
#3 [internal function]: WPML_Nav_Menu->init('')
#4 /nas/content/live/a66markets/wp-includes/class-wp-hook.php(286): call_user_func_array(Array in /nas/content/live/a66markets/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 28


October 12, 2018 at 10:06 am #2811562

nikosM-6

Hello, it is possible to check this soon? what is your timezone? its over 15 hours since your last reply..

October 12, 2018 at 10:44 am #2811652

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi.

Thank you for sending the error log.

❌ Before proceeding please make a full website and database backup! ❌

OPTION 1

We have another client who had the similar issue and was also able to solve it.

Here is the ticket. This may help in your case (summary at the top):
https://wpml.org/forums/topic/wpml-is-throwing-an-fatal-error/

In our case, practically the id is "20" so I will need you to find the entry with element_id:20 and delete that row from the database.

OPTION 2

This option is advised only if this is the first time you enabled WPML on this site and you didn't make any translation yet because it will delete all the saved WPML data from the database.

We will practically need to make a WPML reset in the database to remove all the uncompleted info that was saved with this installation attempt.

In order to do that, I will need you to remove all the tables starting with icl_ and the related options in wp_options from the site's database (Especially: icl_sitepress_version)

Once you delete the icl_ tables and the icl_sitepress_version option from wp_options, you can reinstall WPML.

Please let me know if this solved the issue or if you still need help.

I will be waiting for your response.

PS: Regarding the time zone question, I am on GMT+3 but if you wish I can assign your ticket to another supporter that might be closer to your preferred time zone. However, the queue is a bit busy right now and this may further delay the ticket.

Kind regards,
Mihai

October 12, 2018 at 12:48 pm #2812031

nikosM-6

Hello

removed that element id 20 from database. i was able to finish the setup.

now when i go to Pages i cannot find them

also my website is down 404 on every page.

Can you use my logins that i sent to fix this once for all. I purchased this plugin so i could install it through an admin interface and do my frontend work. However am stuck between tickets for 2 days and it doesnt seem to move on.

I dont intend to touch any more php code as it is not my sector. so please fix it.

October 15, 2018 at 3:16 pm #2818090

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi.

I am glad that you managed to finish the setup. We are making progress.

There are multiple reasons that could cause the pages to not show up but it would be easier to figure out if WPML is what is causing them to not show just by simply disabling the WPML plugin and see if the pages show up again.

Please try that and if the pages show up while WPML is disabled, enable back WPML and follow the steps below:

❌ Before proceeding please make a full website backup! ❌

1. Go to WPML -> Support -> Troubleshooting

2. Press the following buttons:
- "Clear the cache in WPML"
- "Remove ghost entries from the translation tables"
- "Fix element_type collation"
- "Set language information"
- "Fix terms count"
- "Fix post type assignment for translations"

Please check if the issue is fixed after every button press.

Please let me know if this solved the issue.

I will be waiting for your answer.

Kind regards,
Mihai

October 18, 2018 at 1:09 pm #2828043

nikosM-6

Hello, please note that we were able to resolve by removing icl tables from the database.

we eventually translated the website into Vietnamese but now got a slight issue:

1. we switched the default language from English to Vietnamese
2. when we go to hidden link it doesnt redirect to /vi
3. while on default vietnamese, if we go to urls from call to action buttons like domain.com/vi/some-page it automatically converts the url to domain.com/some-page which was meant to be for call to action urls of the english version. how is it possible to fix this without changing the call to actions (they are planted inside multiple blocks and js files and dont wish to redo the whole work again.)

is there a php function that can basically load the domain.com into domain.com/vi url and keep the paths without killing the english ones?

October 18, 2018 at 4:13 pm #2828743

nikosM-6

any chance this was checked?

October 19, 2018 at 1:12 pm #2832174

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi.

I am very glad to hear that the 500 error issue has been solved.

Regarding this "when we go to hidden link it doesn't redirect to /vi" if the default language has been changed to another one, that might also mean that the main domain for that language might not be the "/vi" version anymore but the actual main domain: "hidden link".

However, as the original issue is resolved may I kindly ask you to please open a new ticket for the new issues?

This will help other users with similar problems to find solutions faster when searching the forum.

Kind regards,

Mihai