WPML
Status
Gelöst
Gemeldet für
WPML Translation Management 2.10.3
Gelöst in
WPML Translation Management 2.10.4

Übersicht über das Problem

Wenn Sie einen Beitrag über das Frontend bearbeiten und dieser Beitrag programmgesteuert in andere Sprachen dupliziert wurde, erhalten Sie möglicherweise einen Fehler wie diesen:

PHP Fatal error:  Uncaught Error: Call to a member function get_translation_job() on null in wp-contentpluginswpml-translation-managementinctranslation-jobshelperswpml-translation-job-helper-with-api.class.php:15

Stack trace:

#0 wp-contentpluginswpml-translation-managementinctranslation-jobshelperswpml-update-post-translation-data-action.class.php(12): WPML_Translation_Job_Helper_With_API->get_translation_job(NULL)

#1 wp-contentpluginswpml-translation-managementinctranslation-jobshelperswpml-update-translation-data-action.class.php(84): WPML_TM_Update_Post_Translation_Data_Action->populate_prev_translation(1020, Array)

#2 wp-contentpluginswpml-translation-managementinctranslation-jobshelperswpml-update-translation-data-action.class.php(33): WPML_TM_Update_Translation_Data_Action->get_translated_field_values(1020, Array)

#3 wp-contentpluginswpml-translation-managementincactionswpml-tm-action-helper.class.p in wp-contentpluginswpml-translation-managementinctranslation-jobshelperswpml-translation-job-helper-with-api.class.php on line 15

Problemumgehung

Stellen Sie sicher, dass Sie wissen, was Sie tun, und dass Sie zuerst ein Backup erstellt haben!

Versuchen Sie, über einen FTP-Client oder Ihr Hosting-Panel die Datei unter /wp-content/plugins/wpml-translation-management/inc/translation-jobs/helpers/wpml-translation-job-helper-with-api.class.php zu bearbeiten.
Ersetzen Sie diese beiden Zeilen:

		global $wpml_translation_job_factory;

		return $wpml_translation_job_factory->get_translation_job( $job_id, $include_non_translatable_elements, $revisions );

durch diese eine Zeile:
		return wpml_tm_load_job_factory()->get_translation_job( $job_id, $include_non_translatable_elements, $revisions );

Alle bekannten Probleme →