Skip to content Skip to sidebar

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

Last updated by jovicaM 1 year, 4 months ago.

Assisted by: Mohamed Sayed.

Author Posts
March 31, 2024 at 9:41 pm #15467706

jovicaM

Hi there,

I am translating a custom post type called Destinations (Screenshot 1).

When I switch languages or access the translated page directly, I get a 404 error (Screen Shot 3)

The translated Page URL is correct, but it still returns 404 (Screenshot 2).

I have attempted a fix that was recommended by WLPM support ticket created by somebody else (Screenshot 4).

That did not fix the issue, unfortunately.

Can you please help?

Kind regards,

Jovica

Screenshot 4.png
Screenshot 3.png
Screenshot 1.png
April 1, 2024 at 12:20 am #15467812

Mohamed Sayed

Hi Jovica,
Thanks for contacting WPML support.

1. Please create a new Destination post and translate it then check if you see the same issue.

2. If the issue persists, kindly provide me with the WordPress debug.log, this will allow us to see if any PHP errors are being produced. More Info: https://wordpress.org/support/article/debugging-in-wordpress/

To enable it, open your wp-config.php file and look for:

define('WP_DEBUG', false);

And change it to:

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 which is recommended on a live site.
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

Then try to reproduce the issue and check if any errors were saved to the debug.log log file inside the /wp-content/ directory.

If you can paste your debug.log to https://pastebin.com/ and provide me that link, it would be great!

Let me know please how that goes.

Kind regards,
Mohamed

April 1, 2024 at 1:41 am #15467876

jovicaM

Hi Mohamed,

Thanks for your response.

I have created a new Destination, but the same issue occurs on the translated pages: 404.

I changed the config, as per your instructions, and tried hitting translated pages (multiple times) that give me 404, but no log file has been created. So no PHP errors.

What is next?

Kind regards,

Jovica