Background of the issue:
I am trying to generate the core WordPress sitemap (https://cdn.wpml.org/wp-sitemap.xml). When WPML String Translation is activated, the request ends in HTTP 500. Disabling ST (or the whole WPML plugin set) immediately fixes the issue. Link to a page where the issue can be seen: hidden link
Symptoms:
The wp-sitemap.xml crashes with a 500 error when WPML String Translation is active. Disabling ST resolves the issue, and the sitemap loads fine with a 200 OK status.
Questions:
Why does activating WPML String Translation cause a 500 error on wp-sitemap.xml?
How can I resolve the 500 error while keeping WPML String Translation active?
Welcome to the WPML support forum. I will do my best to help you resolve the issue.
This may be a compatibility issue. So, please share the WordPress debug.log (not WPML debug information) with us so we can collect more details on this. Refer to the following links for instructions
To enable WordPress Debug log, open your wp-config.php file of site root 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 );
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 if you are getting any errors or warnings related to WPML in the log file.
If you can paste your debug.log to http://pastebin.com/index.php and provide me with that link, it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion.)
Yes, the issue is definitely still relevant, but I haven't had the chance to address it yet, even though it's quite important. I truly appreciate your assistance and will provide a proper update around 5 PM CE Time — in about 9 hours from now.
Thank you once again for your valuable time and support.
Thank you for the updates and the debug.log details. The log is showing a PHP notice related to WPML, but this should not cause the 500 error.
Just to confirm, are you using any SEO plugins other than Broken Link Checker by AIOSEO?
Also, do you have a staging or development site (a clone of the live site)? This would help us troubleshoot the issue safely without affecting the live site.
Please note that I have opened a new ticket for the PHP notice to make it easier to follow up. I will get back to you shortly on that ticket.
Thanks again – I’ve been monitoring the `debug.log` and I’m seeing frequent PHP warnings related to `open_basedir` restrictions.
Here are a few examples:
- `file_exists(): open_basedir restriction in effect. File(WP Endpoints-sv_SE.mo)...`
- `realpath(): open_basedir restriction in effect...`
- `Deprecated: Required parameter $wpdb follows optional parameter $post_translations...`
They appear to be coming from `wpml-string-translation` and `woocommerce-multilingual` plugins.
The site is functioning correctly, but I just wanted to check whether these warnings are expected and if there’s a recommended way to suppress or fix them – or if an update will address this soon.
Thanks again for your help,
Dalibor
New threads created by Bigul and linked to this one are listed below:
Thank you for the updates. Glad to know you are now getting the expected results.
Please note that I have opened a new ticket for the “open_basedir restriction” issue to make follow-up easier. I will get back to you shortly on that ticket.