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

문제 개요

때로는 다음과 같은 치명적인 오류가 발생할 수 있습니다:

  • Fatal error: Uncaught exception ‘InvalidArgumentException’ with message ‘Argument ID must be numeric and greater than 0’

이 문제는 WPML Media Translation 플러그인과 관련이 있습니다. 첨부 파일 데이터 없이 이미지에 대한 절대 링크만 있는 이미지가 있는 경우에 발생합니다.

임시 해결 방법

이 문제는 향후 릴리스에서 수정될 예정입니다. 임시 해결 방법으로 다음 단계를 따르세요.


  1. ../wpml-media-translation/classes/images-translation/ 폴더에 있는 class-wpml-media-image-translate.php 파일을 편집하세요.

  2. 다음 코드를 사용하여 get_translated_image_by_url 함수를 대체하세요.
public function get_translated_image_by_url( $img_src, $source_language, $target_language ){

$attachment_id = $this->get_attachment_image_from_guid($img_src, $source_language);
if (!$attachment_id) {
$attachment_id = $this->get_attachment_image_from_meta($img_src, $source_language);
}
if ($attachment_id){
$size = $this->get_image_size_from_url($img_src, $attachment_id);

return $this->get_translated_image($attachment_id, $target_language, $size);
} else {
return $img_src;
};
}

알려진 모든 문제 →