Home›Support›English Support›[Resolved] PHP Fatal error: Uncaught Error: Call to a member function get_source_language_code() on bool in
[Resolved] PHP Fatal error: Uncaught Error: Call to a member function get_source_language_code() on bool in
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing an error when clicking on 'Translate with ATE' for a custom post type or when using the Translation Manager to send items to the Translation Basket, and you notice a spinning animation without any progress, it might be due to a missing column in the database.
Solution: We found that the
wp_icl_translate_job
table was missing the
editor
column, which caused the errors. To resolve this, we recommend running the following SQL query after ensuring you have a full site backup:
ALTER TABLE wp_icl_translate_job ADD `editor` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL
Please try this solution and let us know if it resolves the issue.
Keep in mind that this solution might be irrelevant if it's outdated or not applicable to your case. If the problem persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.
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.
Our next available supporter will start replying to tickets in about 8.53 hours from now. Thank you for your understanding.
I have a similar error, but the solution you have provided did not work.
I get this error, when I try to click on Translate with ATE (custom post type Portfolio from Enfold Theme).
Also, when I try to Translate via Translation manager: I select all Portfolios, send to Translation basket, assign Translator there and click on Send, the spinning animation runs and nothing happens.
Welcome to the WPML support forum. I will do my best to help you to resolve the issue.
Please try the following troubleshooting steps after a full site backup{mandatory} and make sure the issue exists or not.
1) Go to WPML>>Support page, click on the Troubleshooting link (blue link in the middle of the page)
2) On the Troubleshooting page, please click on the following options in the *Clean up* section. Wait for confirmation of processing after each one.
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix WPML tables collation
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment
- Cleanup and optimize string tables
If the issue exists, please share with us the WordPress debug.log(not WPML debug information) to collect more details on this. Refer to these pages for instructions
To enable the 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 that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).
Thank you for the details. If possible, please create a staging/dev site(clone of the live site) and share the credentials with us(including FTP details). So we can troubleshoot the issue without affecting your live site.
I am enabling the private option for the next reply. Please note that we will be installing the Adminer plugin to access the database.
On my local copy, I had the following errors only while trying to translate the posts or sending them for translation.
WordPress database error Unknown column 'jobs.editor' in 'IN/ALL/ANY subquery' for query
SELECT jobs.rid, jobs.job_id as jobId, jobs.editor_job_id as ateJobId, jobs.automatic , translation_status.status,
translation_status.review_status, jobs.ate_sync_count > 100 as isLongstanding
FROM wp_icl_translate_job as jobs
WordPress database error Unknown column 'tj.editor' in 'field list' for query SELECT tj.job_id, tj.editor, t.language_code FROM wp_icl_translate_job tj
JOIN wp_icl_translation_status ts ON tj.rid = ts.rid
JOIN wp_icl_translations t ON ts.translation_id = t.translation_id
WHERE t.trid = 292
It works as expected after running the following query. Because somehow the *_icl_translate_job* table was missing the *editor* column.
ALTER TABLE wp_icl_translate_job ADD `editor` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL
Please try it after a full site backup and let us know your feedback.