Local tasks not correctly limited to base_route I want to create a customized media library for my editors, with a tab navigation similar to the tabs on core's admin/content view. It basically works, but I also want to add a tab leading to a specific "media" taxonomy vocabulary used by my media entities. As soon as I add the taxonomy tab to my YML file, the base_route filter no longer works.

Screenshot with correct behaviour on view pages:


Screenshot with unwanted tabs on taxonomy page:

This is my custom modules' links.task.yml.

# a common view page for all media types
wt_media.media_list:
  route_name: view.medialibrary.medialibrary
  base_route: view.medialibrary
  title: 'All media types'
# a view page only for images
wt_media.image_list:
  route_name: view.medialibrary.imagelibrary
  base_route: view.medialibrary
  title: Images
# a view page only for videos
wt_media.video_list:
  route_name: view.medialibrary.videolibrary
  base_route: view.medialibrary
  title: Videos
# a view page only for documents/files
wt_media.file_list:
  route_name: view.medialibrary.filelibrary
  base_route: view.medialibrary
  title: Documents
# as soon as I activate the following entry, all the tabs are shown
# on every taxonomy overview page, this is not wanted
wt_media.manage_taxonomy:
  route_name: entity.taxonomy_vocabulary.overview_form
  route_parameters:
    taxonomy_vocabulary: media
  base_route: view.medialibrary
  title: Manage Categories


How can I prevent my custom tabs from appearing on the taxonomy overview pages?
You can use hook_menu_local_tasks_alter() to see what all elements are added and can remove elements based on any conditions you like.