Plugin Author
DeBAAT
(@debaat)
Hai All,
Thanks for all your patience.
At last I managed to get it working.
Hope you can see it too after upgrading to V1.9.6.
Best.
Thread Starter
net
(@krstarica)
Still having the same issue.
You’ve changed to:
.media-frame select.attachment-filters {
max-width: 90% !important;
}
but it should be changed to:
.media-frame select.attachment-filters {
max-width: 30% !important;
}
It doesn’t matter whether the max-width is 30% or 90% – it still doesn’t show the drop-down MCM Category filter when trying to Add Media to a Post or Page or Custom Post Type using the Classic Editor.
Thread Starter
net
(@krstarica)
I applied the 30% change ok, but the other change was already in version 1.9.6. Still doesn’t work.
Thread Starter
net
(@krstarica)
You should apply the other change so new CSS is applied by using WP_MCM_VERSION . ‘.2’ instead of WP_MCM_VERSION . ‘.1’
The issue came back. Even after applying the changes both on ‘wp-content/plugins/wp-media-category-management/css/admin.css’ and ‘wp-content/plugins/wp-media-category-management/include/class-wp-mcm-plugin.php’ files.
Yet, the fix was working last week.
—
An interesting point is that with or without any fix:
– filter on categories is offered when setting the post featured image from the media library
– filter on categories is not offered when inserting a media from the media library
Also, it works fine with the classic editor. I will use it for now because in really need this feature.
But to have the category filter also displayed when adding a media from a post with the Gutenberg editor is necessary.
Thread Starter
net
(@krstarica)
Fix for the version 1.9.7:
In wp-content/plugins/wp-media-category-management/css/admin.css change from:
.media-frame select.attachment-filters {
max-width: 90% !important;
}
to:
.media-frame select.attachment-filters {
max-width: 30% !important;
}
After that in wp-content/plugins/wp-media-category-management/include/class-wp-mcm-plugin.php change from:
wp_enqueue_style( $this->plugin_slug .'-admin-styles', WP_MCM_URL . '/css/admin.css', array(), WP_MCM_VERSION);
to:
wp_enqueue_style( $this->plugin_slug .'-admin-styles', WP_MCM_URL . '/css/admin.css', array(), WP_MCM_VERSION . '.2' );
I tried that. I’m pretty sure it worked last week. And now it doesn’t work anymore.
@jeanthoumelin is Correct. The plugin worked last week, but the workaround posted by @krstarica doesn’t work with the classic editor in this version 1.9.7.
Actually @aljono: the @krstarica workaround still works fine the classic editor.
It doesn’t work with Gutenberg editor.
Maybe you confused the two editors in your last post?
@jeanthoumelin No, I always use the classic editor.
admin.css has this in lines 92-95
/* Fix display attachment-filters */
.media-frame select.attachment-filters {
max-width: 30% !important;
}
and class-wp-mcm-plugin.php has this in lines 972-976…
public function enqueue_admin_styles() {
wp_enqueue_style( $this->plugin_slug .’-admin-styles’, WP_MCM_URL . ‘/css/admin.css’, array(), WP_MCM_VERSION . ‘.2’ );
}
@aljono, weird…
I have the exact same lines (the @krstarica workaround in fact), it does work for me with the classic editor. I just checked.
Yes, very weird.
Does the number of images in the Media Library have any effect? I have almost 2500 images, and 2900 items in total.