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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pooja.sarvaiye’s picture

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

Xano’s picture

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

dawehner’s picture

Well, IMHO its kind of a bug if you don't provide a description, isn't it?

Xano’s picture

No, 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.

Lendude’s picture

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

Xano’s picture

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

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

nitinpritika’s picture

HI,

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

Lendude’s picture

Status: Active » Needs review

Let's kick the testbot into action.

Status: Needs review » Needs work

The last submitted patch, 7: drupal_core-help_text_error_message-2424065-7.patch, failed testing.

finne’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
763 bytes
47.28 KB
39.59 KB

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

finne’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 10: remove_error_missing-2424065-10.patch, failed testing.

finne’s picture

Status: Needs work » Needs review
FileSize
703 bytes
1.55 KB

Test needed to see if 'help' was set in views ui forms builder.

Xano’s picture

Issue tags: +Needs screenshots

Thanks! This issue could use screen shots of core from before and after applying the patch.

finne’s picture

Issue summary: View changes
Issue tags: -Needs screenshots

Screenshots added to issue summary.

Lendude’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#1832858: Revamp descriptions of items in handler listings, +#1832862: Make views add field scannable

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

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

Looks like we could add a test for this.

finne’s picture

Assigned: Unassigned » finne
Lendude’s picture

Assigned: finne » Unassigned
Status: Needs work » Closed (duplicate)