Closed foucdeg closed 4 years ago
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
@core23 I don't know if this issue still exists or not. Is there enough information to investigate?
@core23 I don't know if this issue still exists or not. Is there enough information to investigate?
You reported the issue. Please check or close if you don't know if this is still an error.
Well, I'll close it then. I'm not working on a Symfony project right now so I can't really check.
This bug is fixed on the 4.x branch, by storing the media states in clones. See here https://github.com/sonata-project/SonataMediaBundle/blob/4.x/src/Provider/BaseProvider.php#L179
https://github.com/sonata-project/SonataMediaBundle/pull/1592
It was fixed on 3.x too a long time ago.
Environment
Ubuntu 16/04
Sonata packages
Symfony packages
PHP version
Subject
Media files not removed due to wrong path generated for a Media with no id. Entities in a Doctrine postRemove handler have no ID, therefore the generated path is incorrect.
Steps to reproduce
Expected results
Actual results
Interestingly, this issue was previously fixed with #696 and partially again with #1442 (partially because it only fixed thumbnail deletion). I don't know what happened between the two, but the code change in #696 should have remained.