- 상태
- 해결됨
- 보고된 제품
- Advanced Custom Fields Multilingual 2.1.4
- 해결된 버전
- Advanced Custom Fields Multilingual 2.1.4.1
- 관련 플러그인/테마
- Advanced Custom Fields (ACF)
- 주제 태그
- Bug
문제 개요
Advanced Custom Fields 무료 버전을 사용하는 중에 Advanced Custom Fields Multilingual 버전 2.1.4로 업데이트한 경우, 정의되지 않은 acf_get_options_pages() 함수로 인해 치명적인 오류가 발생할 수 있습니다:
PHP Fatal error: Uncaught SymfonyComponentDebugExceptionFatalThrowableError: Call to undefined function acf_get_options_pages() in .../wp-content/plugins/acfml/classes/class-wpml-acf-options-page.php:281
임시 해결 방법
진행하기 전에 사이트의 전체 사이트 백업을 완료했는지 확인하세요.
- …/wp-content/plugins/acfml/classes/class-wpml-acf-options-page.php 파일을 여세요.
- 280번째 줄을 찾으세요.
- 다음을:
private static function isValidOptionPagePostId( $postId ) { return (bool) wpml_collect( acf_get_options_pages() ) ->first( Relation::propEq( 'post_id', $postId ) ); } - 다음으로 교체하세요:
private static function isValidOptionPagePostId( $postId ) { return function_exists( 'acf_get_options_pages' ) && wpml_collect( acf_get_options_pages() )->first( Relation::propEq( 'post_id', $postId ) ); }