WPML
Trạng thái
Đã giải quyết
Được báo cáo cho
WPML String Translation 3.0.7
Đã giải quyết trong
3.0.8

Tổng quan về lỗi

Khi lưu một trang, bạn có thể gặp lỗi như sau:

An error of type E_ERROR was caused in line 57 of the file /srv/htdocs/wp-content/plugins/wpml-string-translation/classes/translations-file-scan/translations-file/wpml-st-translations-file-locale.php. Error message: Uncaught RuntimeException: Unable to parse the language from the translations file /srv/htdocs/wp-content/languages/plugins/ in /srv/htdocs/wp-content/plugins/wpml-string-translation/classes/translations-file-scan/translations-file/wpml-st-translations-file-locale.php:57 

Stack trace: 

#0 /srv/htdocs/wp-content/plugins/wpml-string-translation/classes/translation-files/jed/wpml-st-script-translations-hooks.php(72): WPML_ST_Translations_File_Locale->get() 

#1 /srv/htdocs/wp-content/plugins/wpml-string-translation/classes/translation-files/jed/wpml-st-script-translations-hooks.php(40): WPML_ST_Script_Translations_Hooks->get_file_locale('/srv/htdocs/wp-...', 'jetpack') 

#2 /wordpress/core/5.3.2/wp-includes/class-wp-hook.php(288): WPML_ST_Script_Translations_Hooks->override_jed_file('/srv/htdocs/wp-...', 'jetpack-blocks-...', 'jetpack') 

#3 /wordpress/core/5.3.2/wp-includes/plugin.php(206): WP_Hook->apply_filters('/srv/htdocs/wp-...', Array) 

#4 /wordpress/core/5.3.2/wp-includes/l10n.php(1076): apply_filters('load_script_tra...', false, 'jetpack-blocks-...', 'jetpack') 

#5 /wordpress/core/5.3.2/wp-includes/l10n.php(1035): load_script_translations(false, 'jetpack-blocks-...', 'jetpack') 

#6 /wordpress/core/5.3.2/wp-includes/class.wp-scripts.php(574): load_script_textdomain('jetpack-blocks-...', 'jetpack', '') 

#7 /wordpress/core/5.3.2/wp-includes/class.wp-scripts.php(363): WP_Scripts->print_translations('jetpack-blocks-...', false) 

#8 /wordpress/core/5.3.2/wp-includes/class.wp-dependencies.php(106): WP_Scripts->do_item('jetpack-blocks-...', 0) 

#9 /wordpress/core/5.3.2/wp-includes/class.wp-scripts.php(633): WP_Dependencies->do_items(Array, 0) 

#10 /wordpress/core/5.3.2/wp-includes/script-loader.php(2510): WP_Scripts->do_head_items() 

#11 /wordpress/core/5.3.2/wp-includes/class-wp-hook.php(288): print_head_scripts('') 

#12 /wordpress/core/5.3.2/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array) 

#13 /wordpress/core/5.3.2/wp-includes/plugin.php(478): WP_Hook->do_action(Array) 

#14 /wordpress/core/5.3.2/wp-admin/admin-header.php(132): do_action('admin_print_scr...') 

#15 /wordpress/core/5.3.2/wp-admin/edit-form-blocks.php(402): require_once('/wordpress/core...') 

#16 /wordpress/core/5.3.2/wp-admin/post.php(179): include('/wordpress/core...') 

#17 {main} thrown

Vấn đề này liên quan đến WPML Dịch Chuỗi và việc quét các tệp plugin.

Chúng tôi đang điều tra vấn đề này và cố gắng tìm cách khắc phục phù hợp.

Giải pháp tạm thời

Như một giải pháp tạm thời, bạn có thể truy cập wpml-string-translation/classes/translations-file-scan/translations-file/wpml-st-translations-file-locale.php và thay đổi đoạn mã:

			default:
				throw new RuntimeException( 'Unable to parse the language from the translations file ' . $this->filepath );

thành:

			default:
				return: '';

Tất cả các lỗi đã ghi nhận →