Bỏ qua điều hướng

Open

Reported for: Advanced Custom Fields Multilingual 2.1.4.2

Topic Tags: Compatibility

Overview of the issue

When using Advanced Custom Fields with WPML, taxonomy fields assigned to custom post types may appear blank in secondary languages. This occurs despite setting the field to “Copy” or “Copy Once”.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open …/wp-content/plugins/acfml/classes/class-wpml-acf-worker.php file.
  • Look for line 80.
  • Replace:
    		$metaValue          = get_metadata( $metaType, $objectToId, $metaKey, true );
    
  • With:
    		wp_cache_delete( $objectToId, $metaType. '_meta' );
    		$metaValue          = get_metadata( $metaType, $objectToId, $metaKey, true );
    

2 phản hồi đến “Advanced Custom Fields - Taxonomy Fields Are Blank in Secondary Languages”

  1. Hi,
    I realized that my class-wpml-acf-worker.php file is already have the
    wp_cache_delete( $objectToId, $metaType. ‘_meta’ );
    $metaValue = get_metadata( $metaType, $objectToId, $metaKey, true );

    But I still cannot see the translated custom ACF taxonomies in my taxonomy filter list in my page.
    What can be the problem?

    • Hello there,

      Please ensure that the translation preference for the field is set to “Copy.” After that, try making a small edit to the original content (such as adding a space) and save it. This should trigger an update to the translation. Then, resave your translation and check if the issue is resolved.

      If the problem persists, please feel free to open a chat, we’d be happy to take a closer look at the issue.

Để lại phản hồi

Vui lòng bám sát chủ đề và tôn trọng người khác. Nếu bạn cần trợ giúp với các vấn đề không liên quan đến bài đăng này, hãy sử dụng Diễn đàn Hỗ trợ của chúng tôi để bắt đầu trò chuyện hoặc gửi yêu cầu hỗ trợ.

Bạn có thể sử dụng các thẻ sau:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>