-
-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setAssetCollection() behaviour is strange/broken #2107
Comments
A note to the assignees: I hope you can check this out and provide some insights on why this code is like that for years now, and why never someone found it strange. Maybe there is something I just don't grasp about this… |
Ok, playing around with this brought a new insight: Adding the "old" collections back to the Asset is need for them to be correcly removed. Might be due to owning side voodoo in Doctrine. I still think unassigning from all existing collections can be skipped…
|
neos-development-collection/Neos.Media/Classes/Domain/Model/Asset.php Lines 407 to 411 in 8d77820
Imho these lines have no effect as long as the affected asset isn't being queried within the same request after the new collections have been set. However, this is exactly what I fiddled around with the My plan now is to prepare a fix targeting |
Woah, thanks for digging out that really old issue! I had forgotten about it, TBH. ❤️🔥 |
Description
The logic of
asetAssetCollections()
inAsset
seems broken and is at least inefficient.Steps to Reproduce
neos-development-collection/Neos.Media/Classes/Domain/Model/Asset.php
Lines 398 to 413 in 8d77820
Expected behavior
$this->assetCollections
Actual behavior
$this->assetCollections
eventually, even though the may no longer have the asset assignedAffected Versions
Neos: 2.3, 3.x and 4.0, all versions as of today (2018-06-28)
The text was updated successfully, but these errors were encountered: