-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
[ZF3] when deleting an organization logo, reference from the organization entity is not deleted. #412
Comments
@kilip can you take a look at this? |
@cbleek I am working on this issue now |
Sorry @cbleek looks like I can't fix this issue, I don't have a good understanding with doctrine mongodb relation. Looks like this problem caused by doctrine reference issue.
|
OK. @TiSiE can you help? |
Add 'DeleteImageSetListener' back to 'Core/File/Events' event manager.
Shouldn't the listener be mentioned in our documentation? |
Organizations do not use a single image anymore, but ImageSets instead. (That was implemented to be able to store images in different sizes like thumbnail and original). The code quoted above is for backwards compatibility and is not used anymore for new organization entities. The removing of references for ImageSets is done by DeleteImageSetListener, which is registered in the event manager with the key 'Core/File/Events'. However, that listener was removed in 2a516cb, effectively caused this issue. @kilip is to blame here for removing the lines 😜 , as well as myself for approving the changes 😠 . We (and by we, I mean mostly me) need to improve on pull request reviews.. 😕 Anyway, it's working again 😄 |
@cbleek probably.... |
It WAS fixed. However, it's broken again. Because of the LazyControllerFactory. When creating the FileController, the wrong EventManager gets injected! Must be the 'Core/File/Events', but instead is the 'Core/Ajax/Events'. So, I say using LazyControllerFactory MAY NOT be a good idea, especially in this case! We should always create dedicated factories. (which is the recommend way in ZF anyway.) Still, there will be a new issue for that! |
To prevent this happening again I will create a behat feature to test this add and remove logo functionality |
* pr-462: [Organizations] added FileControllerFactory, ref #412 * fixed error when removing images because of the wrong EventManager injected * added behat scenario to test add and remove logo from organization [Organizations] changed filter for ListJobQuery from Organization to Organization::getId() [Organizations] improved Organizations Profile Page * fixed errors when Organization Image is null * added list organization profile filter for User::getRole() is not a User::ROLE_USER * added Behat scenario to tests profile listing for Guest and Recruiter [Organizations] improved Organization Profile pages * allowed guests to access organization profile page * fixed job list pagination in organization profile page also fix ajax loading * displayed image in organization profile detail [Organizations] added factory to create InviteController [Organizations] added organizations profile page ref #458 * profile lists available in route lang/organizations/profile * profile detail available in route lang/organizations/profile/:id * added feature and scenario to test profile [PHPUnit] ignored deprecated classes and function from code coverage via @deprecated comment [Behat] improved behat tests: * clean all data everytime test performed [Organizations] fixed label for Organization Name improved behat tests, ref #458 [Organizations] added job paginator for Organization Profile page ref #458 [Behat] improved creating job [Core] added behat tests for organization profile [Organizations] added profile controller ref #458
If the organization logo is deleted, you'll get an error like
it only happens on the ZF3 branch
The text was updated successfully, but these errors were encountered: