WPML
상태
해결됨
해결된 버전
3.0.3

문제 개요

WPML > 언어에서 특정 언어(또는 추가한 사용자 정의 언어)의 로캘을 잘못 설정한 경우, 해당 언어를 방문할 때 다음과 같은 치명적인 오류가 발생할 수 있습니다:

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

임시 해결 방법

현재 이 오류를 수정하고 있습니다.
WPML > 언어 > 언어 편집에서 로캘을 수정할 것을 권장합니다.
관리 화면에 접근할 수 없는 경우 WPML 문자열 번역을 임시로 비활성화해야 합니다. 가장 좋은 방법은 FTP를 통해 /wp-content/plugins/ 폴더로 이동하여 폴더 이름을 다른 이름으로 변경하는 것입니다.

임시 패치로 wpml-string-translation/classes/translations-file-scan/translations-file/wpml-st-translations-file-locale.php 파일의 65번째 줄을 편집하여 다음을:

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

다음과 같이 교체하세요.

return '';

알려진 모든 문제 →