Problem/Motivation
This field widget is designed to display "You can link to media from the following services: YouTube" if there is no help text. If there is help text, it intends to display the help text and "You can link to media from the following services: YouTube" as items in a bulleted list. But only "You can link to media from the following services: YouTube" displays, no matter if there is help text configured.
Steps to reproduce
Try setting help text on an oembed field.
Proposed resolution
Fix the tiny bug causing this.
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | Screenshot 2021-05-20 at 17.41.12.png | 37.85 KB | gauravvvv |
| #6 | Before-patch.png | 21.1 KB | mitthukumawat |
| #6 | Before-patch.png | 21.1 KB | mitthukumawat |
Issue fork drupal-3208849
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
cilefen commentedComment #4
cilefen commentedComment #5
cilefen commentedBefore:
After:
Comment #6
mitthukumawat commentedI have checked with the changes and the help text is showing now.
Also I have attached a patch with the new changes.
Comment #7
mitthukumawat commentedComment #9
larowlanThanks for your work here.
Because this is a bug, we require an automated test to confirm it is fixed, and that it stays fixed
Comment #10
larowlanHiding the patch file because there's an MR
Comment #11
mohit_aghera commentedComment #12
mohit_aghera commentedChanging to Needs review as I've added tests in the PR
Comment #13
gauravvvv commentedPatch #12, added help text and includes help text as well. can be move to RTBC.
Adding after patch screenshot for reference.
Comment #14
oktboy commentedThank you for the patch. This works when we add media items from Content -> Media -> Add Media -> Media Type
When the Media Library Modal opens within a content type, the text does not appear.
Drupal 8.9
Comment #16
phenaproximaTest looks okay to me; I did some clean-up in there to remove some unnecessary things :) Unassigning as well. I think this is probably ready for final review/RTBC.
@oktboy:
That is expected. The media library modal does not use the field widget, so it won't show the configured help text. I think there is another open issue for that, though.
Comment #17
danflanagan8This looks great. I reproduced the bug locally. Then I applied a patch version of the MR and saw the expected behavior.
There's no evidence of the new test ever running without the fix, but I ran the test locally without the fix and it indeed fails. So the test is good.
Comment #18
larowlanRemoving issue credit for @mitthukumawat and @Gauravmahlawat as we already had before and after screenshots and there was an MR so no need for a patch version of it.
Comment #19
larowlanLeft one minor suggestion, other than that this looks ready to go to me.
Comment #23
yogeshmpawarSorry for the noise.
Now - https://git.drupalcode.org/project/drupal/-/merge_requests/561 MR is ready to review & I closed my newly created MR - https://git.drupalcode.org/project/drupal/-/merge_requests/1331
Comment #24
larowlanThe suggestion from my review is still to be resolved
Comment #25
yogeshmpawarUpdated the MR as per suggestion in #19.
Moving back to Needs Review.
Comment #26
danflanagan8The suggestion from @larowlan has been added to the MR. Setting back to RTBC.
Comment #27
alexpottCommitted and pushed 2c979f05ce to 9.3.x and 1a5cc0d9ab to 9.2.x. Thanks!
Backported to 9.2.x as a low risk bug fix.