Background of the issue:
I am trying to use GraphQL with WPML, but sometimes the query results become blank. All translations are available in the backend.
Symptoms:
The GraphQL query returns a blank array despite having all translations available in the backend.
It looks like there is an issue with your translation sitepress-multilingual-cms plugin that's throwing a fatal error in the PHP logs.
PHP Fatal error: Uncaught Error: Call to a member function getTaskType() on null in /srv/htdocs/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/core-api/core/BackgroundTask/Service/BackgroundTaskService.php:65 Stack trace: #0 /srv/htdocs/wp-content/plugins/sitepress-multilingual-cms/classes/background-task/AbstractTaskEndpoint.php(66):
Before proceeding further, can you please try the following?
1) Take a full backup of your site and database before proceeding. It is highly advised to try these on a dev or staging site first, so your live site isn't compromised.
2) Deactivate all plugins except WPML, String Translation, WPML GraphQL and WPGraphQL.
3) Switch to a standard theme like 2024 or 2021.
4) Check for the issue if it still happens.
5) Then start activating plugins one by one while keep checking for the issue. This way you 'll be able to pinpoint a conflict when & where it starts creating the problem.
6) If after activating all plugins you see that it still works fine, then switch to your theme and see if that's causing it.
Please let me know your findings and I'll try my best to help you further on the matter.
I need to take a closer look at your site. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.
Your next answer will be private, to share this information safely.
Also provide detailed steps to reproduce the issue and links to pages in the admin and on the frontend.
IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.