[Resolved] There has been a critical error on this website with WPML
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing an E_ERROR in the RecommendationsManager.php file (Uncaught Error: Call to a member function get_subscription()) when trying to edit content in the admin area.
Solution: We suggested that the error might be related to a problem with the options table, possibly missing an auto-increment index, which could happen after a migration. We recommended checking the status of the options table.
Please note that the solution provided might be outdated or not applicable to your case. If the issue persists, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you need further assistance, please open a new support ticket in our forum: https://wpml.org/forums/forum/english-support/.
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.
I am trying to: go to admin When I try to edit my content get the error
Link to a page where the issue can be seen: hidden link
I expected to see:
Instead, I got:
When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.4.2
Active theme: YOOtheme (version 4.2.12)
Current plugin: WPML Multilingual CMS (version 4.6.9)
PHP version 8.1.27
Error Details
=============
An error of type E_ERROR was caused in line 400 of the file /home/whgpascn/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/src/Recommendations/RecommendationsManager.php. Error message: Uncaught Error: Call to a member function get_subscription() on null in /home/whgpascn/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/src/Recommendations/RecommendationsManager.php:400
Stack trace:
#0 /home/whgpascn/public_html/wp-includes/class-wp-hook.php(324): OTGSInstallerRecommendationsRecommendationsManager->getRecommendationStoredNotices()
#1 /home/whgpascn/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#2 /home/whgpascn/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/admin-notices/notices/Recommendation.php(30): apply_filters()
#3 /home/whgpascn/public_html/wp-includes/class-wp-hook.php(324): OTGSInstallerAdminNoticesNoticesRecommendation::getCurrentNotices()
#4 /home/whgpascn/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#5 /home/whgpascn/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/admin-notices/Loader.php(31): apply_filters()
#6 /home/whgpascn/public_html/wp-includes/class-wp-hook.php(324): OTGSInstallerAdminNoticesLoader::initDisplay()
#7 /home/whgpascn/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#8 /home/whgpascn/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#9 /home/whgpascn/public_html/wp-admin/includes/class-wp-screen.php(424): do_action()
#10 /home/whgpascn/public_html/wp-admin/includes/screen.php(243): WP_Screen->set_current_screen()
#11 /home/whgpascn/public_html/wp-admin/admin.php(212): set_current_screen()
#12 {main}
thrown
Languages: English (English )Spanish (Español )French (Français )
Timezone: Europe/Paris (GMT+02:00)
Hello there,
Welcome to WPML support forum.
While one of my teammates takes care of your case I will provide you with the first debugging steps.
This error is usually associated to a problem with the options table which could be corrupted and missing auto-increment index. Have you performed any migration lately or do you have a way to check its status?
Thank you for contacting the support. I am assigned this ticket and 'll try my best to help fix the problem. I hope continuing in English won't be a problem.
In the context of previous messages here, please let me know that:
- were you able to reproduce the problem in your test site?
- can you use latest version of WordPress and WPML plugins, in your test site?
--- if yes, then please try with only WPML plugins and a standard WordPress theme. Because your current theme isn't compatible with WPML (https://wpml.org/theme/yootheme/).