Background of the issue:
I am trying to access translated menu links on my website hidden link using WPML. The issue occurs when I try to open a menu link in the Arabic version of my site.
Symptoms:
Translated menu links open into error 500 when accessed from the Arabic version of the site, but work when accessed from the English version and then switched to Arabic.
Questions:
Why do translated menu links result in error 500 when accessed directly from the Arabic version?
How can I resolve the error 500 issue with translated menu links in WPML?
Before we continue debugging your issue, please update WPML to version 4.6.14. The version you're currently using is not compatible with WordPress 6.7 and that may be the cause of your problem.
While one of my teammates takes care of your ticket, I will provide you with the first debugging steps.
“500 error” means that there is an error in the PHP code that your site runs. When errors are not caught, the server stops everything and returns a page that says “500 error” or an empty page. Different servers are configured to display these errors slightly differently, but they all mean the same – there is an unhandled PHP error in the site’s code.
First, you need to see what the errors are. Guessing what might be the problem and trying different solutions may lead to even more trouble. The first step is to enable debug. You can do this by adding a few lines to the site’s wp-config.php file. With error log enabled, you will see what the actual problem is.
To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);
In order to enable the error logging to a file on the server you need to add yet one more similar line:
define( 'WP_DEBUG_LOG', true );
In this case, the errors will be saved to a debug.log log file inside the /wp-content/directory.
I mean the menus were fine before so i dont know, it became like this when of your support team (Noman) did something with the premalinks for another issue.
either way i enabled debuging the log was saying php memory limit so i increased it from 128 to 256. im not getting any more errors in the error log
BUT still the 500 error is still there when using ANY link in the translated version.
I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.