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.
Tagged: Exception
This topic contains 10 replies, has 2 voices.
Last updated by Andreas W. 1 year, 8 months ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
August 18, 2023 at 8:38 pm #14255163 | |
susyA |
Tell us what you are trying to do? Is there any documentation that you are following? Is there a similar example that we can see? What is the link to your site? |
August 18, 2023 at 9:43 pm #14255313 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Could you please increase your WP Memory limit to 256M? 128M is the minimum required by WPML. PHP Memory Limit 512M define('WP_MEMORY_LIMIT', '256M'); Paste it just before: / That's all, stop editing! Happy blogging. / Now, verify the current settings at WPML > Support > WordPress. Then complete the translation again. These settings can be limited directly by your hosting provider, so I recommend you contact and ask them to modify them directly. https://wpml.org/home/minimum-requirements/ Now, please try to download and activate the Toolset Types Plugin again. Further, all available plugins call always be found inside the Downloads Section of your account on wpml.org. You can also download the plugin directly here: Please try downloading and installing the plugin by going to Plugins > Add new. If this will not solve the issue, please let me know. Best regards |
August 18, 2023 at 9:56 pm #14255321 | |
susyA |
Thanks for the reply. Unfortunately, I'm still not able to get the plugin installed. Manually installing the plugin will spin for a while, then just show a blank page. |
August 18, 2023 at 10:43 pm #14255341 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Ok, but did you first change the WP Memory Limit? I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further. You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it. IMPORTANT I may have to install a plugin called "All In One WP Migration" to make a copy of the website where I can investigate the issue further. However, I would also be very grateful if you could provide a staging site or copy of the website from your server yourself for this purpose. If you have any questions about creating such a staging site, you can consult your hosting provider. Just take note that WPML should be registered on this site again. If you are unable to provide such a copy of the site for testing, please let me know on this ticket. The private response form looks like this: Next time you reply, click "I still need assistance." Video: Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form. Best regards |
August 18, 2023 at 10:51 pm #14255345 | |
susyA |
Hi Andreas, I did increase the memory limit, yes. |
August 18, 2023 at 11:03 pm #14255351 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I would honestly prefer to test this on a Staging site and not on the live site, but if the issue only occurs on the production site, I can offer to do nothing else but create a copy of the site with the plugin "All In One WP Migration" and test the site locally on my PC. Take note, if this issue is caused by your custom theme, then we do not offer any guarantee for such cases and it is the responsibility of the theme developer to solve the issue. WPML Support Policy: The private reply form is enabled again. Best regards |
August 19, 2023 at 2:21 am #14255469 | |
susyA |
Hi Andreas, I installed the All In One plugin but the export of the site is quite large (27GB), even with media files not included. Are there other items I can exclude for your debugging purposes? Do not export spam comments |
August 19, 2023 at 4:39 pm #14256775 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Thank you for your message. Yes, you can exclude from the package: Do not export media library (files) Everything else will be required. I can offer to create and download the package myself - also I would like to take a look at the site today, as I will not be working on Sunday and Monday - maybe I can spot the issue and solve it quickly. The private reply form is enabled again so that you can provide me access. Please make sure to also provide FTP access to the server, if possible. If you are unable to provide such a copy of the site for testing, please let me know on this ticket. The private response form looks like this: Next time you reply, click "I still need assistance." Video: Best regards |
August 19, 2023 at 5:57 pm #14257125 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Yes, no problem 🙂 Only, please take note, that before reporting an issue you should always verify if the issue occurs with the latest versions of all plugins and I see that Elementor has not been updated for quite a long time. Anyhow, I did not take any changes to the site and I am about to create a new site package (without media, post revisions, and spam comments). Anyhow, the huge size seems to be coming from the database I suspect, as the package creation is taking a while already and it might be that the database is actually big. If this is the case, the migration might take me at least a couple of hours or more. I will contact you again as soon I was able to test the site on localhost. Best regards |
August 19, 2023 at 5:59 pm #14257127 | |
susyA |
Thanks Andreas! Elementor was updated as part of this update, but when we ran into issues, we decided to roll back to a previous version. But the issue was happening even on the latest version, just FYI. |
August 20, 2023 at 3:03 am #14257577 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Sadly I was not able to obtain a smaller package of the site, as even without media the size was bigger than 20 GB and this is why the migration took until now. Take note that the site crashes if you disable WPML, as the theme is calling WPML functions without checking if the WPML is activated, which means the theme is calling a function that is not able to work if WPML is not active on the site. The developer of the theme can solve such errors by wrapping the functions that call WPML into: <?php if (class_exists ('sitepress')) { // your code here } The developer of the theme should check the functions.php of the theme on line 489 and wrap the functions into this condition accordingly and you will no longer get an error when WPML is disabled. He can adjust his custom hook to this: add_action('init', 'my_icl_set_current_language'); // add_action('wp_loaded', 'my_icl_set_current_language'); function my_icl_set_current_language() { global $sitepress; if (class_exists ('sitepress')) { $supported_lang = array_keys(icl_get_languages('skip_missing=0&orderby=code')); //set the allowed language codes $langtemp = @$_COOKIE['language']; $wplanguage = @$_COOKIE['wp-wpml_current_language']; if($langtemp != '') { if($langtemp == 'can-fr') { $langtemp = 'fr'; $cookie_val = 'can-fr'; } else if($langtemp == 'can') { $langtemp = 'en'; $cookie_val = 'can'; } else { $langtemp = 'en'; $cookie_val = $langtemp; } if (in_array($langtemp, $supported_lang)) $get_lang = $langtemp; if (in_array($get_lang, $supported_lang)) { //save cookie setting //setcookie ('curlanguage', $langtemp, time() + (10 * 365 * 24 * 60 * 60), '/'); if($langtemp != $wplanguage && $get_lang == 'fr'){ wp_redirect( get_site_url().'/fr' ); exit; } //$sitepress->switch_lang($get_lang, true); } } } } Take note, that this is not really something WPML or WordPress related, it is simply the best coding practice when working with PHP Classes. Now, in order to be able to access the site I first had to manually deactivate the plugin "Secure Admin IP" on the server. I continued my tests without this plugin. While revising the server I further was able to confirm that the Toolset Types plugin folder actually is still available in wp-content/plugins/types. What is kind of odd here, is that the plugin's folder seems to be missing important files and this is why the plugin is no longer showing up in WordPress. It seems like someone removed files of the plugin from the server by mistake or your site was a victim of a malicious attack. So, first of all, I removed the folder wp-content/plugins/types from the server. Then I installed the latest version of Toolset Types from Plugins > Add new. This did not cause any error on my test and the CPTs were available again. I also enabled WP DEBUG in order to check for existing PHP issues before I reinstalled Types and I did not get any errors. Only make sure to first remove the old /types/ folder from /wp-content/plugins/. In case you need any further assistance on this matter, please take note, that I do not work on Sundays and Mondays but I will be glad to assist you again on Tuesday. Have a nice weekend 🙂 Best regards |
August 20, 2023 at 2:32 pm #14258579 | |
susyA |
Thank you Andreas, that's very helpful. All is working as expected now. |