WPML
Trạng thái
Đã giải quyết
Đã giải quyết trong
3.0.3

Tổng quan về lỗi

Khi bạn thiết lập một locale không hợp lệ trong WPML > Ngôn ngữ cho một ngôn ngữ (hoặc một ngôn ngữ tùy chỉnh mà bạn đã thêm), bạn có thể gặp phải lỗi nghiêm trọng như sau khi truy cập vào ngôn ngữ đó:

Fatal error: Uncaught RuntimeException: Language of .../wp-content/languages/plugins/sitepress-ar3.mo cannot be recognized in ...wp-contentpluginswpml-string-translationclassestranslations-file-scantranslations-filewpml-st-translations-file-locale.php on line 65

( ! ) RuntimeException: Language of .../wp-content/languages/plugins/sitepress-ar3.mo cannot be recognized in ...wp-contentpluginswpml-string-translationclassestranslations-file-scantranslations-filewpml-st-translations-file-locale.php on line 65

Call Stack

#	Time	Memory	Function	Location

1	0.4015	410016	{main}( )	...index.php:0

2	0.4017	410296	require( '...wp-blog-header.php' )	...index.php:17

3	0.4017	410840	require_once( ...wp-load.php' )	...wp-blog-header.php:13

4	0.4019	411368	require_once( '...wp-config.php' )	...wp-load.php:37

5	0.4019	416200	require_once( '...wp-settings.php' )	...wp-config.php:97

6	0.4676	3677216	do_action( )	...wp-settings.php:394

7	0.4676	3677592	WP_Hook->do_action( )	...plugin.php:465

8	0.4676	3677592	WP_Hook->apply_filters( )	...class-wp-hook.php:310

9	0.4923	3975520	SitePress->plugin_localization( )	...class-wp-hook.php:286

10	0.4923	3975584	load_plugin_textdomain( )	...sitepress.class.php:3350

11	0.4923	3975728	load_textdomain( )	...l10n.php:791

12	0.4923	3975728	apply_filters( )	...l10n.php:621

13	0.4923	3976128	WP_Hook->apply_filters( )	...plugin.php:208

14	0.4923	3977632	WPMLSTMOHooksLoadTextDomain->overrideLoadTextDomain( )	...class-wp-hook.php:286

15	0.4923	3978112	WPML_ST_Translations_File_Locale->get( )	...LoadTextDomain.php:59

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

Chúng tôi hiện đang tiến hành khắc phục lỗi này
Bạn nên sửa locale trong WPML > Ngôn ngữ > Chỉnh sửa ngôn ngữ
Nếu bạn không thể truy cập bất kỳ trang quản trị nào, bạn nên tạm thời vô hiệu hóa WPML Dịch Chuỗi – cách tốt nhất là truy cập qua FTP vào thư mục /wp-content/plugins/ và đổi tên thư mục đó thành một tên khác.

Như một bản vá tạm thời, hãy chỉnh sửa tệp wpml-string-translation/classes/translations-file-scan/translations-file/wpml-st-translations-file-locale.php ở dòng 65 và thay thế:

throw new RuntimeException( 'Language of ' . $this->filepath. ' cannot be recognized' );

Bằng:

return '';

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