- 🇫🇮Finland sokru
Based on patch from #11, but I made few small improvements:
1. No new translation strings, since there's almost 80k installations and some/many of them might have made translations.
2. Removed unrelated coding standard fixes, so its easier to review and get committed.
3. Corrected the return type ofoEmbedData()
Added the related issue 📌 Accessibility enhancements for html output of iframe tag (title, id, name, inner A link) Needs review . Patch → on issue has some related/duplicate code, but it has two interesting features that might be left for follow-up:
- Transliterates and removes some unwanted characters from the title.
- Adds$instace_id
argument torenderEmbedCode
, so title's will be unique if there's multiple instances of same video on page. - 🇫🇮Finland sokru
Added the tests and removed single undefined function (
filterCharaters()
) from patch on #13. - 🇫🇮Finland sokru
This fixes the tests other than
ProviderUrlParseTest
. That would need updating mocks. I'm willing to do that, if that increases the changes of commit. - Status changed to RTBC
over 1 year ago 5:57pm 24 February 2023 - 🇫🇮Finland sokru
And small improvement by handling the cases if returned json is not valid.
- 🇫🇮Finland sokru
And small improvement by handling the cases if returned json is not valid.
- Status changed to Needs review
over 1 year ago 10:42am 23 March 2023 - 🇫🇷France DYdave
Watchout: #11 is the last patch supported on PHP:7.4.
All the more recent patches contributed afterwards (#12 to #18) use the null safe operator (
?->
) which is supported from PHP 8 onwards, therefore crashes on PHP 7.4, with the following error:The website encountered an unexpected error. Please try again later.
ParseError: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in Composer\Autoload\{closure}() (line 110 of modules/contrib/video_embed_field/src/Plugin/video_embed_field/Provider/YouTube.php).It would be great if we could get a more recent version of the patch compatible with 7.4, but that's not necessarily a priority,
Otherwise, patch from #18 works great on PHP 8.1.
Thanks again to everyone for the great help with this ticket and contributions.
- 🇫🇮Finland sokru
Small change to decrease severity of logging. This could be debated, but the reasoning is that it will produce noise to logs (eg. when forwarding only emergency/critical/error messages to log service) everytime private video is rendered on cold caches.