- Issue created by @Wouter Waeytens
- Status changed to Needs review
9 months ago 12:27am 15 February 2024 - last update
9 months ago Custom Commands Failed - Status changed to Needs work
9 months ago 4:14am 15 February 2024 - First commit to issue fork.
- ๐ฎ๐ณIndia shalini_jha
I have added a patch against 11.x . please review
- Status changed to Needs review
9 months ago 1:36pm 16 February 2024 - Status changed to Needs work
9 months ago 3:53pm 16 February 2024 - ๐บ๐ธUnited States yospyn
Confirming #8 worked for me on core 10.2.3. The message went from "Could not retrieve the oEmbed resource." to something much more helpful, "An error occurred: Could not retrieve the oEmbed resource. Title of video here".
When you fix the media entity, the message stops showing. Thanks!
- ๐ฌ๐งUnited Kingdom andrew.farquharson
oily โ made their first commit to this issueโs fork.
- ๐ฌ๐งUnited Kingdom andrew.farquharson
Testing this issue in a local Drupal 11.x site. see screenshot โ showing how a YouTube video saved in a node when the video was publically available but has since been deleted on YouTube is handled.
A message similar to this, also set in an autogenerated error thumbnail image is displayed if the setting for a YouTube video is changed from 'public' to 'private'. In neither case is a message displayed on the page.
A message IS displayed if the user, for example, tries to edit the url to a non-existent url and then save the node.
- ๐ฌ๐งUnited Kingdom andrew.farquharson
The error message has been replaced by: 'Check the url. It does not correspond to any remote oEmbed resource.' The existing test has been updated to assert the new error message. All tests are green. Changing to 'Needs review'.
- ๐ฌ๐งUnited Kingdom andrew.farquharson
@smustgrave The original description was that the url needs to be included in the error message. After reproducing the error I discovered that the description is not clear enough. What in fact happens is that according to form validation functionality the Oembed resource field is highlighted in red. See Oembed url highlighted in red โ in combination with the message being printed in the standard message position of the page.
This led me to think that either the existing form validation mechanism which is similar to many other form libraries out there on the web is not adequate and so form validation itself needs to be fixed, or it does its job in this case.
From there I concluded that the problem is not that the url is not printed in the error message which would seem like unnecessary duplication, since the url is contained in the field that has been highlighted in red, rather the problem is that the error message itself is not clear. In as few words as possible I have tried to rectify the message. The existing message does not say what action needs to be taken. The new message makes it clear IMO that it is the url that is at fault. Therefore the url should be checked as it appears not to exist.
- ๐บ๐ธUnited States smustgrave
FYI this "update" believe only benefits a sighted user who can see the entire form.
- ๐ฌ๐งUnited Kingdom andrew.farquharson
There is a problem with the existing description. I have made some edits to the description already but this one remains.
'When you try to reference a media object to an entity it sometimes throws the error...'
This sounds to me like the error occurs from time to time randomly. But that is not the case. When the user is trying to add a YouTube video (i have not tested with Vimeo) in the background httpclient validates the url by issuing a GET request to that Url. If the Url does not correspond to a currently publically available YouTube video as proven by the result of the GET request, validation fails and the error message appears.
On the other hand, when a YouTube video has been successfully added as an Oembed resource in the media library and then inserted into a node but the video is then deleted or made private by the YouTube owner, then this error is shown in the node โ
- ๐ฌ๐งUnited Kingdom andrew.farquharson
I have done further manual UI testing of the error message(s). It is clear that the description is confusing and misleading. I have made further edits.