Problem/Motivation

This is an extremely minor issue of documentation. In the commenting for hook_views_data in core/modules/views/views.api.php, these lines are incorrect:

      // Default label for relationship in the UI.
      'label' => t('Example node'),

The correct key is title, like so:

      // Default label for relationship in the UI.
      'title' => t('Example node'),

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3504660

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

maskedjellybean created an issue. See original summary.

quietone’s picture

Version: 11.0.x-dev » 11.x-dev

Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies.

The current comment is in agreement with the definition of 'label' in \Drupal\views\Plugin\views\relationship\RelationshipPluginBase. Is this suggested change correct?

nicxvan’s picture

Issue tags: +Novice

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

alvar0hurtad0’s picture

Status: Active » Needs review

Hi.
I've created a MR for this.

stanzin’s picture

Hey, I was looking for beginner-friendly issues for newcomers in the #first-contribution channel and noticed this issue is tagged as 'Novice.' It seems the tag was added later. Although the MR is already up and correct, if it’s not accepted, could we consider saving this for newcomers?

perhaps we could reconsider the 'Novice' tag to align with its intended purpose. @quietone, @nicxvan and @alvar0hurtad0 your thoughts on this. This would help new contributors find beginner-friendly issues more easily, as I’m finding it a bit challenging to identify basic issues for newcomers. Thanks!

nicxvan’s picture

Yeah I don't know the policy, @alvar0hurtad0 has over a hundred credits so I don't think he is a novice any more.

I added the tag before the MR was created expressly so a beginner could work on this.

stanzin’s picture

Got it, thanks for clarifying ! I’ll look for other beginner-friendly issues. Marking this as resolved then ?

nicxvan’s picture

No it hasn't been reviewed yet.

stanzin’s picture

got it, thanks )

cmlara’s picture

See #3473667: [policy, no patch] Decide policy related to use of novice tag regarding the (lack of) policy regarding Novice tagged issues.

smustgrave’s picture

Status: Needs review » Needs work

Appears to be other instances in the api file that are using label but correct key may be title. That needs to be verified too.

alvar0hurtad0’s picture

Hi,

my apologies if I overstep. I was just trying to contribute a bit. I've a super tight schedule in my personal live and most of the contribution time that my employer give to me is spend in events organization and mentoring. So I saw something I can do in just a few minutes and I decided to go for it.

Sorry again if it was inappropriate.

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

daniel_mm02’s picture

Hi, I've added a commit to try to fix it, I think it's correct, if not let me know and I'll take a look at it.

alvar0hurtad0’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Believe this is correct.

nicxvan’s picture

quietone’s picture

Title: Incorrect hook_views_data comment » Incorrect 'label' in hook_views_data example

  • quietone committed 5221f2e0 on 11.x
    Issue #3504660 by alvar0hurtad0, daniel_mm02, nicxvan, smustgrave:...
quietone’s picture

The intention of the 'Novice' tag can be found in the list of Issue tags -- special tags. It states,

It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

What that means on each issue can, and should be different. For some issues, like this one the task is to create the 'correct MR', for other it could be that the 'review' is suitable for a novice. In fact, this one is suitable for a novice contributor to learn about the review process.

quietone’s picture

Status: Reviewed & tested by the community » Fixed

Committed 5221f2e and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

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