File metabox not appearing on WPML translated posts

Support General File metabox not appearing on WPML translated posts

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #49772
    Cédric DagherirCédric Dagherir
    Participant

    Hi,
    I have an issue with a client site that uses WPML.

    I have registered my metaboxes this way :

    add_filter('rwmb_meta_boxes', function ($meta_boxes){
    
    	$meta_boxes[] = [
          'id'       => 'infos_documentation',
          'title' => 'Informations',
          'post_types'    => 'documentation',
          'fields' => [
            [
              'name' => __('Document', 'xxx'),
              'id'   => 'document',
              'type' => 'file_advanced',
              'force_delete' => true,
            ],
            [
              'name' => __('Description', 'xxx'),
              'id'   => 'description',
              'type' => 'textarea',
            ],
    
          ],
        ];
    
    	return $meta_boxes;
    });

    However, a strange issue happens. The "document" metabox does appear on the english post version (default language), as you can see here :
    original language post

    But on the other side, the translated versions of the post won't have this metabox (the "description" metabox appears though), as you can see here for the french version of the post :
    french language post

    I have checked this post here :
    https://metabox.io/translate-custom-fields-with-wpml/

    But I could not complete step 3 as there was no "meta_box" in the Custom Fields translation part of the WPML settings, nor "meta-box" fields group Post Types.

    And this issue concerns the file_advanced metabox as the textarea shows up in every language.
    It should also be noted that "Media attachments > Duplicate uploaded media to translations" is unticked.

    Please let me know if I am missing something.
    Thanks

    #49773
    PeterPeter
    Moderator

    Hello Cedric,

    Thanks for reaching out.

    I use your PHP code to register the custom fields and using WPML plugin on my site but don't see that issue. If you deactivate WPML plugin, do you see 2 fields work properly?

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.