Needs work
Project:
Drupal core
Version:
main
Component:
media system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2020 at 10:23 UTC
Updated:
25 May 2023 at 15:35 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
deepaverma commentedCreated patch for Drupal 8.9.6
Comment #3
marcoscanoJust a straight re-roll for 9.2.x
Comment #4
volkswagenchickAdding some tags for DrupalCon NA which is happening April 12-16 virtually.
Can steps to reproduce/test/validation be added to the summary?
I tagged this issue novice in hopes that a new contributor could work on this, thanks.
Comment #5
grgcrlsn321 commentedComment #6
grgcrlsn321 commentedComment #7
grgcrlsn321 commentedUpdated summary.
Comment #8
abhijith s commentedApplied patch #3 and it works fine.The error message is showing correctly with the field name after applying this patch.
Before patch:

After patch:

RTBC +1
Comment #9
grgcrlsn321 commentedTested patch and works as expected with correct error message, "Media content field is required."
Comment #10
catchWe should add a positive assertion here for the text we actually expect to get, otherwise there's no guarantee we're getting a validation message at all.
Comment #12
vakulrai commented@catch , I have rerolled and modified the patch. I have replaced
pageTextNotContainswithpageTextContainsassertion.Thanks.
Comment #13
chetanbharambe commentedComment #14
chetanbharambe commentedVerified and tested patch #12.
Patch applied successfully and looks good to me.
Testing Steps:
# Goto: Extend -> Enable the Media Library and Media modules.
# Create the content type with the Media Library field and make it a required field
# Create the new content type using the Media Library field and save it.
# User is able to see a wrong error message, "This value should not be null"
Expected Results:
# User should see the message like "Media field is required"
Actual Results:
# User is able to see a wrong error message, "This value should not be null"
Can be a move to RTBC.
Comment #15
catchThis feels like it shouldn't be necessary. Is there a reason we can't use the browser's own required form element feature? Going to tag for subsystem maintainer review.
Also feel like 'The value should not be null' isn't really good for any situation, so what about changing the default message itself?
Comment #19
sahilgidwani commentedRerolled patch 12 for Drupal 9.5
Comment #21
Ratan Priya commentedTried to re-roll patch #12 for 11.x-dev.
Comment #22
smustgrave commentedDid not test but was previously tagged for issue summary update which still looks like needs to be done.