-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Metadata is wrong when using markEntityToUpload with two entity classes #2071
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hey! I know it's has been a while since the issue was open, but just came across this and it should be fine to just move those lines inside the loop since there are already cache mechanism in |
Hi Fran. Thanks for resurrecting this thread. I’ll see if I can find time to work on this. |
[Uploadable] Fixes meta issue when uploading entities of different types
[Uploadable] update CHANGELOG.md
adds test to make sure we can upload two entities of different types
[Uploadable] Fixes meta issue when uploading entities of different types
[Uploadable] update CHANGELOG.md
adds test to make sure we can upload two entities of different types
Hi guys,
I found a bug and know how to fix it but I want to log it here first.
I inject
\Stof\DoctrineExtensionsBundle\Uploadable\UploadableManager
into my controller.I then use it to upload two files to two entities.
Upload fails on the second one because
lib/Gedmo/Uploadable/UploadableListener.php
uses metadata of the first entity for both.getFilePathFieldValue
will then complain because the entity does not match the metadata.Easy fix would be to move these two lines inside the
foreach
loop but it would have a negative impact on performance.How about a caching mechanism to avoid calling
getClassMetadata
andgetConfiguration
?What do you guys think? Good enough for a PR?
Thanks!
The text was updated successfully, but these errors were encountered: