Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing a Critical Error when switching languages on their website, which was previously resolved as a plugin conflict but had reoccurred, suggesting it might be a WPML issue.

Solution:
1. We asked the client to enable the WordPress debug log by editing the

wp-config.php

file and adding the following lines:

define('WP_DEBUG', true);<br />define('WP_DEBUG_LOG', true);<br />define('WP_DEBUG_DISPLAY', false);

2. After reproducing the issue, the client was instructed to locate the debug log at

/wp-content/debug.log

and share the contents via a service like pastebin.com.
3. Upon reviewing the error log, we identified a PHP Fatal error related to the Tour & Travel Booking Manager plugin. We found a similar issue in our database and asked the client what the results were with that plugin deactivated.

If you're experiencing a similar issue, we recommend following the steps above to enable debugging and identify any PHP errors. If the solution provided here is not relevant to your case, or if it's outdated, please check our related known issues, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If you still need assistance, we encourage you to open a new support ticket in our support forum.

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: 

This topic contains 3 replies, has 3 voices.

Last updated by Bobby 1 year, 2 months ago.

Assisted by: Bobby.

Author Posts
February 23, 2024 at 5:28 pm #15338873

franciscoP-26

Hi.

When i switch the Lang from the original one to EN I get a Critical Error! Reported before and it was solved due other Plugin conflit (that now i have allready asked and get the answer that it was a WPML issue).

Can you see please?

Tks attention.

February 23, 2024 at 6:05 pm #15338974

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

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

Hi there.

Before your ticket is assigned to one of my colleagues, I will try to help.

Can you please enable the WordPress debug log and recreate the issue to see if you are getting a longer error message that is more specific?

This will allow us to see if any PHP errors are being produced.

More Info: https://codex.wordpress.org/Debugging_in_WordPress

In order to do that, edit the wp-config.php file inside your WordPress directory and insert the following lines:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Now please reproduce the issue once again.

Locate the debug log in: /wp-content/debug.log

Paste the content (if any) on a site like pastebin.com and then share the link here with us (only you and us will see the URL you are sharing).

We will be waiting for your response.

Kind regards,
Mihai Apetrei

February 23, 2024 at 6:12 pm #15338994

franciscoP-26

https://pastebin.com/vGqBRDY6

February 23, 2024 at 11:23 pm #15339650

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi,

When I review your error log this is the Fatal error I have found.

[23-Feb-2024 10:48:39 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_page_permastruct() on null in /home/exoticaround/public_html/wp-includes/link-template.php:435
Stack trace:
#0 /home/exoticaround/public_html/wp-includes/link-template.php(397): _get_page_link()
#1 /home/exoticaround/public_html/wp-includes/link-template.php(197): get_page_link()
#2 /home/exoticaround/public_html/wp-includes/post.php(4595): get_permalink()
#3 /home/exoticaround/public_html/wp-content/plugins/tour-booking-manager/tour-booking-manager.php(81): wp_insert_post()
#4 /home/exoticaround/public_html/wp-content/plugins/tour-booking-manager/tour-booking-manager.php(33): TTBM_Woocommerce_Plugin::on_activation_page_create()
#5 /home/exoticaround/public_html/wp-content/plugins/tour-booking-manager/tour-booking-manager.php(20): TTBM_Woocommerce_Plugin->load_ttbm_plugin()
#6 /home/exoticaround/public_html/wp-content/plugins/tour-booking-manager/tour-booking-manager.php(132): TTBM_Woocommerce_Plugin->__construct()
#7 /home/exoticaround/public_html/wp-settings.php(473): include_once('/home/exoticaro...')
#8 /home/exoticaround/public_html/wp-config.php(1139): require_once('/home/exoticaro...')
#9 /home/exoticaround/public_html/wp-load.php(50): require_once('/home/exoticaro...')
#10 /home/exoticaround/public_html/wp-blog-header.php(13): require_once('/home/exoticaro...')
#11 /home/exoticaround/public_html/index.php(17): require('/home/exoticaro...')
#12 {main}
thrown in /home/exoticaround/public_html/wp-includes/link-template.php on line 435

Doing a quick search in our database of similar threads, I can see that this error was also experienced by another user who reported it coming from the Tour & Travel Booking Manager, which seems that you are using the same plugin.

Ref:
https://wpml.org/forums/topic/moved-hosting-critical-error-when-switching-to-translations/

What are your results with that plugin deactivated?

February 27, 2024 at 11:17 pm #15351614

franciscoP-26

Hi.

Yes it was a problem with that Plugin... They solved it!

Many tks! (once again 🙂 )