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

Last updated by Bigul 9 months, 3 weeks ago.

Assigned support staff: Bigul.

Author Posts
September 4, 2019 at 6:06 pm #4513397


Whenever we translate a page this page throws a 404 error. After about 30 Minutes to one hour this is fixed magically. We do not know how and why. All other pages seem untouched and are working fine.

Our translation was in the making until today so it was not visible to the users. We manage a large site with about 100 pages. Today I activated the translated pages but things got worse.

I needed to apply a change on the homepage but I got an error in the classic editor. I canceled my editing and opened the homepage in the visual builder. I was able to save my work. But then all pages of our site where unaccessible and showed a 404.

What did I do to fix it:
- rebuild the links via WMPL Settings
- flushed the permalinks

This fixed the error. But it took me about half an hour because the rebuild takes a lot of time with such a big site.

What can we do in order to prevent this 404 errors?

Our setup: WordPress 5.2.2 with Divi Theme 3.27.x (latest version)

Link to a page where the issue can be seen: hidden link (at this moment all is fine)

I will happily grant access to our site tomorrow (after I have a valid backup) if necessary, thanks for your patience.

September 4, 2019 at 6:26 pm #4513561


Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)


Welcome to the WPML support forum. I will do my best to help you to resolve these issues.

Does it happen when you update the translated page from WPML Translation Editor or native WordPress Editor?

Please share with me the WordPress debug.log (not WPML debug information). Please check this page for instructions

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 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please do the steps to reproduce the bug and check you are getting any errors or warning related to WPML in the log file.

If you can paste your debug.log to and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).



September 5, 2019 at 8:29 am #4516819


Hi Bigul

Many thanks for your quick response! I did the steps as requested.

In order to reproduce the error I performed the following:
- translated the page hidden link
- edited the page hidden link

Debug log:
Error log:

I pasted both logs just in case. 😉

The good news is that *no* 404 error appeared. Nevertheless there are errors in both log files. I would be happy if you can take a quick look into them.

What did I change? I enabled English in WPML>Hide languages (Sprachen einblenden). Maybe this did the trick? If so I would consider it a critical bug because this option is very helpful for teams like us who run a big WP site. We decided to translate a critical number of pages before showing the translation to our audience. Working with a staging instance was not an option due to several reasons (too long to describe them here).

Is there a possibility to run WPML in english mode on a German WP installation? It would be much easier for me to follow the tutorials and workarounds that are posted in the forum.


September 5, 2019 at 8:31 am #4516849


ups ... forgot to tell you that we use the WPML Advanced Editor for translation and the DIVI editor for page updates.

September 5, 2019 at 5:38 pm #4521113


Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Kate,

Thank you for the details and Debug log information. The Debug log is showing a few database errors and a column of the database table is missing. So please try the following troubleshooting steps after a full site backup and make sure the issue is existing or not.

1) Log in to your database using a tool like PHPMyAdmin

2) Run the following query. May database table prefix will differ in your case

ALTER TABLE wp_icl_translations ADD COLUMN language_code varchar(7);

3) Go to WPML>>Support page

4) Click on Troubleshooting link (blue link in the middle of the page)

5) In Troubleshooting page, please click on the following options of the *Clean up* section. Wait for confirmation of processing after each one.

- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix WPML tables collation
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment
- Recreate ST DB cache tables



September 11, 2019 at 12:18 pm #4553307


Hi Bigul

First of all sorry for the late reply. We had a freeze due to some important customer presentations.

I tried to execute your troubleshooting steps. The corresponding table in my database (wp975) is named wpzm_icl translations. So I altered the command to

ALTER TABLE wpzm_icl_translations ADD COLUMN language_code varchar(7);

But it seems that the column is already existing. This is the German error message from the attached screenshot (see attached image).

That seems a bit strange because I can only see 10 columns in table wpzm_icl_translations. Do you have any idea here?

How about running the cleanup in WMPL>Support page. Will that help anyway?

Thank you very much

September 12, 2019 at 9:57 am #4559959


Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Kate,

Thank you for the updates. Please try the WPML Troubleshooting steps after a site backup and let me know your feedback.



The topic ‘[Closed] 404 error after translating or editing a page’ is closed to new replies.