I am a bit confused about the behaviour of the media browser.
Here is the situation:
We have 2 collections and 2 tags
When I edit an asset (that has no tag and no collection selected yet):
I am able to select any tag and/or collection. As expected.
As soon as I select a collection and save, I cannot add tags anymore:
Even if I added tags before, they are not visible anymore as soon as I added the asset to a collection.
The only way to get the tag visible in the edit-mask is to
a) remove the asset from all collections
b) edit the collection and add the tag there:
I don’t understand why tags are not visible anymore in the edit-view of an asset when a collection is selected. Is this a bug or do I not understand the priciple of the system?
Btw, if you can still add tags to the asset via drag&drop and the filtering works. But you cannot remove the tag as this is not possible with drag&drop.
I think the reason for the behaviour is the condition used to assign the tag-variable for the view in \Neos\Media\Browser\Controller\AssetController::editAction:
public function editAction(Asset $asset)
'tags' => $asset->getAssetCollections()->count() > 0 ? $this->tagRepository->findByAssetCollections($asset->getAssetCollections()->toArray()) : $this->tagRepository->findAll(),
'asset' => $asset,
'assetCollections' => $this->assetCollectionRepository->findAll()
Any feedback would be nice, I could also help to fix/test if this is a bug.