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

Issue fork drupal-3208849

Command icon 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

cilefen created an issue. See original summary.

cilefen’s picture

Issue summary: View changes

cilefen’s picture

Status: Active » Needs review
cilefen’s picture

Before:

before

After:

after

mitthukumawat’s picture

StatusFileSize
new21.1 KB
new21.1 KB
new878 bytes

I have checked with the changes and the help text is showing now.
Also I have attached a patch with the new changes.

mitthukumawat’s picture

Status: Needs review » Reviewed & tested by the community

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

larowlan’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Bug Smash Initiative, +Needs tests

Thanks for your work here.

Because this is a bug, we require an automated test to confirm it is fixed, and that it stays fixed

larowlan’s picture

Hiding the patch file because there's an MR

mohit_aghera’s picture

Assigned: Unassigned » mohit_aghera
mohit_aghera’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests

Changing to Needs review as I've added tests in the PR

gauravvvv’s picture

StatusFileSize
new37.85 KB

Patch #12, added help text and includes help text as well. can be move to RTBC.

Adding after patch screenshot for reference.

oktboy’s picture

Thank 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

phenaproxima made their first commit to this issue’s fork.

phenaproxima’s picture

Assigned: mohit_aghera » Unassigned

Test 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:

When the Media Library Modal opens within a content type, the text does not appear.

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.

danflanagan8’s picture

Status: Needs review » Reviewed & tested by the community

This 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.

larowlan’s picture

Removing 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.

larowlan’s picture

Status: Reviewed & tested by the community » Needs review

Left one minor suggestion, other than that this looks ready to go to me.

yogeshmpawar made their first commit to this issue’s fork.

yogeshmpawar’s picture

larowlan’s picture

Status: Needs review » Needs work

The suggestion from my review is still to be resolved

yogeshmpawar’s picture

Status: Needs work » Needs review

Updated the MR as per suggestion in #19.
Moving back to Needs Review.

danflanagan8’s picture

Status: Needs review » Reviewed & tested by the community

The suggestion from @larowlan has been added to the MR. Setting back to RTBC.

alexpott’s picture

Version: 9.3.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 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.

  • alexpott committed 2c979f0 on 9.3.x
    Issue #3208849 by yogeshmpawar, cilefen, phenaproxima, mohit_aghera,...

  • alexpott committed 1a5cc0d on 9.2.x
    Issue #3208849 by yogeshmpawar, cilefen, phenaproxima, mohit_aghera,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.