pimcore
pimcore copied to clipboard
Make editmodeImagePreview available for YouTube videos
Changes in this pull request
The config editmodeImagePreview
for the video editable was not working for YouTube videos. I made it working in this pull request.
Additional info
I'm not sure if you see this as a bug fix or as a feature/improvement. But, in our case, this solves a bug in loading the editor in the admin panel, so that's why I submitted this pull request in 10.5.
Review Checklist
- [ ] Target branch (
10.5
for bug fixes, others11.x
) - [ ] Tests (if it's testable code, there should be a test for it - get help)
- [ ] Docs (every functionality needs to be documented, see here)
- [ ] Migration incl.
install.sql
(e.g. if the database schema changes, ...) - [ ] Upgrade notes (deprecations, important information, migration hints, ...)
- [ ] Label
- [ ] Milestone
@bitfactory-jurgen-jansma thanks a lot for your PR! 2 thinks we should consider as well:
- We should also use
$inAdmin
argument forgetYoutubeCode()
same as forgetAssetCode()
, see: https://github.com/pimcore/pimcore/blob/b447bc02341a2eb097bc48c2f6e9f3f84d708829/models/Document/Editable/Video.php#L457 - to be consisten we should try to fix that for Vimeo and Dailymotion as well
Thanks a lot!
@brusch thank you for your review. I have used the $inAdmin
argument instead of $this->editmode
now. I have also added a thumbnail for Vimeo and Dailymotion as well.
@blankse I didn't add the type hinting because it wasn't use yet, and I expected that it wasn't there for a reason. However, I have added the type hinting to all edited methods.
Failing Codeception tests are not related to this PR ... caused by #13171 (fix)