[wp-trac] [WordPress Trac] #30584: Media Manager - Grid view does not respect taxonomy URL parameters.

WordPress Trac noreply at wordpress.org
Tue Dec 2 23:59:49 UTC 2014


#30584: Media Manager - Grid view does not respect taxonomy URL parameters.
----------------------------------------+-----------------------------
 Reporter:  Phyrax                      |      Owner:
     Type:  defect (bug)                |     Status:  new
 Priority:  normal                      |  Milestone:  Awaiting Review
Component:  Media                       |    Version:  4.0.1
 Severity:  normal                      |   Keywords:
  Focuses:  javascript, administration  |
----------------------------------------+-----------------------------
 The title pretty much explains the issue I've found.  Current setup is as
 follows:

 * XAMPP v3.1.0 Beta 6
 * Wordpress 4.0.1
 * No plugins active ( no mu-plugins either )
 * Twenty Fourteen Theme v1.2
 * PHP 5.4.7
 * MySQL 5.5.27

 == Steps to reproduce ==
 First and foremost you'll need to add this to your theme/plugin functions
 file:
 {{{
 #!div style="font-size: 80%"
 Register taxonomy to attachments:
   {{{#!python
 add_action( 'init', 'jw_tax' );
 function jw_tax(){
         register_taxonomy( 'media_cats', 'attachment', array(
                 'label' => __( 'Media Categories', 'jw' ),
                 'hierarchical' => true,
         ));
 }
   }}}
 }}}

 ''Please excuse the neglected count callback to update attachment taxonomy
 counts.''

 1. Upload an attachment via Media > Add New ''( or use an existing image
 )''
 2. Edit the attachment and add a term to it under the new Media Categories
 taxonomy and save.
 3. Upload a few extra images, but do not attach them to the taxonomy.
 4. Once saved, go to Media > Media Categories ( new taxonomy ), and click
 on the count number for that term
         a. ''It shows zero due to me not setting the count callback,
 ignore that as it's unrelated.''
 5. You are then redirected to the media library with the url paramter. ''(
 example: http://localhost/wordpress/wp-
 admin/upload.php?media_cats=testing&post_type=attachment )''
         a. At this point if you're in list view, the library respects the
 media_cats url parameter and loads only the image you assigned to the term
 name
         b. If you switch to grid view, the grid shows all images and
 ignores the URL parameter.

 === NOTES ===
 Regardless of switching between list and grid view, either before ( via
 user profile data ) or after the redirect to the library upon clicking the
 count number, grid view is just not responding to the URL parameters.

 Essentially if the user is using the grid view, by default, there is no
 way for users to sort the library by taxonomy data.  In lieu of that, we
 have used a plugin that adds a dropdown to the media toolbar for taxonomy
 stuff.  This plugin, however, still does not help with the above issue of
 the grid view and URL parameters, but should provide a good starting point
 for someone.

 The Plugin: https://wordpress.org/plugins/enhanced-media-library/

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30584>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list