Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Help texts or descriptions should never be required, yet Views UI at least makes it look like views data help texts are required by adding Error: missing help anytime a help text is missing. This sends the message that the module that exposes these fields is in some way buggy.
Proposed resolution
Don't display a message in case if missing help text.
change
into
Remaining tasks
Make the help texts fully optional.
User interface changes
Less pointless warnings.
API changes
Make views data help texts fully optional.
Comment | File | Size | Author |
---|---|---|---|
#13 | remove_error_missing-2424065-13.patch | 1.55 KB | finne |
#13 | interdiff-2424065-10-13.txt | 703 bytes | finne |
#10 | error missing help fixed.png | 39.59 KB | finne |
#10 | error missing help.png | 47.28 KB | finne |
#10 | remove_error_missing-2424065-10.patch | 763 bytes | finne |
Comments
Comment #1
pooja.sarvaiye CreditAttribution: pooja.sarvaiye commented@Xano, please provide more information or error page screenshot to reproduce this issue. I have created a view without providing description and I am not seeing any error.
Comment #2
XanoMy apologies for the confusion. It's not about creating a view, but about implementing hook_views_data() and using those fields during view creation/editing. The attached screenshot shows what happens when you want to use fields that have been exposed through
EntityViewsData
.Comment #3
dawehnerWell, IMHO its kind of a bug if you don't provide a description, isn't it?
Comment #4
XanoNo, it's not. Titles/labels are primary human-readable identifiers. Help texts and descriptions are secondary and should never technically be required, because not every title/label (such as Entity ID) needs additional clarification as they are already self-descriptive enough.
Comment #5
LendudeThe problem I see with not providing a help message by default is that you assume that the title will be self-descriptive enough in any context/translation. If you don't provide a default help text, there is nothing to translate should you wind up with a situation where the title doesn't suffice and you do need additional help.
Comment #6
XanoDescriptions are not a translation tool. We have translation contexts that take care of this.
This has been discussed with UX people in the past: only one primary human-readable identifier is required, everything else is optional and depends on the particular item (field, column, form item, etc.) and should be decided on a case-by-case basis.
Comment #7
nitinpritika CreditAttribution: nitinpritika commentedHI,
Use the attached patch and as you applied the error message will not display again.
Issue Description :: at this path --> sites/all/modules/contrib/views/includes/admin.inc
here I have seen in if condition component 'base' is using 2 times and according to your post issue, I have need to set that condition like ....
" when we fetch the view handlers field and if there is help text is not given then no error message should come and if it is define then in that case it will display."
And now I corrected and attached patch.
Please apply it and let me know the feedback.
Thanks
Pritika Agrawal
Comment #8
LendudeLet's kick the testbot into action.
Comment #10
finneI rerolled patch #7 in D8 (previous patch had D7 paths and was truncated). The issue is visible in a plain core D8 install (see screenshot). The patch fixes this. The example in the screenshots shows the Title field in a node view.
Comment #11
finneComment #13
finneTest needed to see if 'help' was set in views ui forms builder.
Comment #14
XanoThanks! This issue could use screen shots of core from before and after applying the patch.
Comment #15
finneScreenshots added to issue summary.
Comment #16
LendudeLooks like this is also part of #1832858: Revamp descriptions of items in handler listings, but this smaller change looks good to go to me.
As described in #1832862: Make views add field scannable any clean-up of that part of the interface is great.
Comment #17
alexpottLooks like we could add a test for this.
Comment #18
finneComment #19
Lendudefixed in #2509722: "Error: missing help" in Views for Node fields without descriptions