Skip Navigation

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

Last updated by Bruno Kos 1 year, 6 months ago.

Assigned support staff: Bruno Kos.

Author Posts
January 23, 2019 at 3:58 pm #3121382

lauraN-2

I am trying to:
When following specific links to the website sometimes URLs without the language specified don't work. So unless it says evcompany.eu/nl/... it will give a 404 error. However, this isn't always the case sometimes there is no problem at all when using a link that doesn't specify the language. So how does this problem keep occurring and how do we solve it?

Link to a page where the issue can be seen:
hidden link
hidden link

I expected to see:
A page

Instead, I got:
A 404 error

January 24, 2019 at 8:27 am #3123915

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

Both of these links for work for me - in other words, sometimes you would get 404 error on a page, while sometimes that same page will work? And this happens without any specific cause?

When there is no trigger or culprit known, it is hard to figure out the exact cause and possible fix. However, the best way to start here is that you enable WordPress debug log and read these logs as soon as the issue appears again. This might give us some idea on what is going on behind the scenes.

Therefore, can you please enable the WordPress debug log. This will allow us to see if any PHP errors are being produced. More Info: https://codex.wordpress.org/Debugging_in_WordPress

1. Edit wp-config.php and insert the following lines:

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

2) Debug log should be located within /wp-content/debug.log

3) As soon as you encounter 404 again, open debug log and paste the latest lines here. No need to paste the entire log file, just 50 lines or so will do. Please censor any sensitive information.

Can you tell me if this approach works for you?

In the meantime, could you make sure your server conforms to our minimum requirements?
https://wpml.org/home/minimum-requirements/

Based on provided debug information, I can see the following - WP Memory Limit: 40M.

Specifically, could you set WP Memory limit to at least 256MB and then let me know if this fixed your issue?
https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

If unsure on how to set this, you can consult your host/server admin to do this. After you increase this value, you can confirm it by checking on WPML -> Support by finding the “Memory limit” value.

Regards,
Bruno Kos

The topic ‘[Closed] Links don't always work’ is closed to new replies.