Skip Navigation

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

Problem:
The client reported that after translating their website and switching languages from the original to translated versions, the page layout changes from wider to tighter.
Solution:
We recommended the following steps to address the issue:
1. Ensure that the WPML plugin setup follows the instructions provided in the documentation, particularly focusing on the theme option settings. For detailed guidance, visit https://travelerwp.com/how-to-set-up-wpml-plugin/.
2. If the problem persists, enable error reporting to gather more detailed information about the issue. This involves modifying the 'wp-config.php' file to enable WP_DEBUG and related settings. Here is the code to add:

// Enable WP_DEBUG mode<br />define( 'WP_DEBUG', true );<br /><br />// Enable Debug logging to the /wp-content/debug.log file<br />define( 'WP_DEBUG_LOG', true );<br /><br />// Disable display of errors and warnings<br />define( 'WP_DEBUG_DISPLAY', false );<br />@ini_set( 'display_errors', 0 );<br /><br />define( 'SCRIPT_DEBUG', true );

After implementing these changes, check if a debug.log file is created in the wp-content directory and review its contents.

If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket for further assistance.

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

Last updated by alawsT 1 month, 3 weeks ago.

Assisted by: Noman.

Author Posts
September 22, 2024 at 10:30 pm #16206959

alawsT

Background of the issue:
We have an issue that we have translated our website and once we changed the languages from the original language to translated languages the site goes from wider to tighter. Link to a page where the issue can be seen: hidden link

Symptoms:
The page layout changes from wider to tighter and smaller after switching languages.

Questions:
What is the possible issue causing the page layout to change from wider to tighter after switching languages? and how we can fix it

September 23, 2024 at 9:34 am #16208345

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. I can see the issue on your site. I've examined the source code of Arabic language and it seems an error-page ID is assigned to the body tag and some CSS is added to the Arabic language which apparently causes this issue. So, please follow the below steps and let me how it goes:

1. Please make sure you have followed the step-by-step instructions from this doc: hidden link especially the theme option settings section as you can see in the attached screenshot.

2. If the issue still persists, please enable error reporting on your site as I need to see the details of the latest error log to understand the cause of the issue better. To enable it, open your ‘wp-config.php’ file and look for ‘define(‘WP_DEBUG’, false);’. Change it to:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
 
define( 'SCRIPT_DEBUG', true );

After adding the above code, please try visiting the Arabic language page and reloading the backend/frontend of your site again, and if this process creates a debug.log file in your site's wp-content directory. Please send me its contents.

Please let me know the results,
Thank you

Theme settings.png
error page.png
September 28, 2024 at 12:50 am #16231472

alawsT

Dear Noman,

Thanks for your kind support,

I would like to confirm that regarding your point and solutions number 1 we confirm that we have previously followed very well as the instruction in the document.

Regarding your point number 2 it very hard foe us to comply with and do it, so is there any other type of solutions to fix the issue.

September 28, 2024 at 1:41 am #16231485

alawsT

Dear Noman,

Many thanks for your kind help and let me tell you that the problem has been solved

and we found out that once we activate the "WPML Media Translation " makes the problem to our site and after we deactivate "WPML Media Translation " the site back to normal

Thanks for the support.