pimcore icon indicating copy to clipboard operation
pimcore copied to clipboard

Make editmodeImagePreview available for YouTube videos

Open bitfactory-jurgen-jansma opened this issue 2 years ago • 4 comments

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, others 11.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

github-actions[bot] avatar Sep 14 '22 13:09 github-actions[bot]

@bitfactory-jurgen-jansma thanks a lot for your PR! 2 thinks we should consider as well:

  1. We should also use $inAdmin argument for getYoutubeCode() same as for getAssetCode(), see: https://github.com/pimcore/pimcore/blob/b447bc02341a2eb097bc48c2f6e9f3f84d708829/models/Document/Editable/Video.php#L457
  2. to be consisten we should try to fix that for Vimeo and Dailymotion as well

Thanks a lot!

brusch avatar Sep 15 '22 09:09 brusch

@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)

brusch avatar Sep 28 '22 12:09 brusch