Support

Account

Home Forums Backend Issues (wp-admin) Attachment Meta Box Disappears

Solving

Attachment Meta Box Disappears

  • I have added a custom meta box (using ACF) to attachments. I have also added my own custom category taxonomy to attachments. When I go to edit an attachment, if I select a category, the custom meta box disappears. The only rule that is set for the custom meta box is:

    Show this field group if:
    Media Attachment (Edit) -> is equal to -> All

  • Hi @adamholte

    Thanks for the bug report. Can I ask what version of ACF you are running?

    A similar issue was fixed in 4.2.2

  • Thanks Elliot. I was a little behind, so I did update to 4.2.2, but the issue is still happening. I am using WP 3.6.

  • Hi @adamholte

    Thanks mate, I’ll test this myself and get back to you.

    Cheers
    E

  • Confirming the same bug. It appears that checking the taxonomy on the media edit screen adds a acf-hidden class to the meta box. The screenshots linked below show the meta box class before and after checking the taxonomy item. The other screenshots show the ACF field group settings.

    WordPress Version 3.6
    ACF Version 4.2.2
    No ACF Add-Ons.
    No other plugins.
    Chrome (OSX) Version 29.0.1547.57

    Before taxonomy checked:
    http://cl.ly/image/3v0X2k2D0m1e

    After taxonomy checked:
    http://cl.ly/image/3z2b3f1r2c2Y

    Field group settings:
    http://cl.ly/image/1b450G2Y2l30
    http://cl.ly/image/2J0K0Y1I352o

  • Hi @bpk

    Thankyou for the screen shots. I now understand the issue and will get this fixed.

    Cheers
    E

  • I get the same thing when using taxonomies with acf_form on frontend. Postbox class gets acf-hidden after few checkboxes checked (postbox acf_postbox no_box acf-hidden ). Any help?

    Thanks

  • Hi @bazelski

    Can you please update to ACF v4.3.0?
    Let me know if that helps.

    Thanks
    E

  • Got the very same problem with 4.3.8, but only for other user roles than administrators. I use the following code to achieve that the users can only edit their own posts:

    
    add_action('pre_get_posts', 'query_set_only_author' );
    	function query_set_only_author( $wp_query ) {
    		$screen = get_current_screen();
    
    		if ($screen->base === 'post')
    	    		return $query; // From ACF Support Forum
    
    	    global $current_user;
    	    if( is_admin() && !current_user_can('edit_others_veranstaltungen') ) {
    	        $wp_query->set( 'author', $current_user->ID );
    	        add_filter('views_edit-veranstaltung', 'fix_veranstaltungen_counts');
    	    }
    	}

    Any ideas to fix that problem? I searched the ACF js but it didn’t help me.

  • This seems like what’s happening to me. I’m on ACF PRO 5.2.0. Any time that I check a taxonomy term, the metabox disappears. If I check two terms quickly, it will disappear and then reappear. Check three terms quickly, disappear, reappear, disappear. I can see it’s cycling between display:hidden and display:block on the categorydiv box.

  • I think I am in the same boat. I am using ACF Pro 5.2.0 and WordPress 4.1.1

    I have no rules set up on the regular ‘post’ post_type at all, and have checked (and checked again) all other rules, and none apply to posts, yet when I click on a category to assign my post to, the category meta box disappears completely. Re-showing it from the Screen Options panel does work, but it disappears again after selecting another category.

  • This fix (taken from another thread and thanks to Hoblin) does a perfect quick and dirty fix for now:

    // fix for ACF PRO version 5.20
    	add_filter('admin_footer', function(){
    		echo '<script type="text/javascript">jQuery("#screen-options-wrap .metabox-prefs").prepend(\'<input type="checkbox" style=”display: none;">\');</script>';
    	});
Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Attachment Meta Box Disappears’ is closed to new replies.