The field_widget @defgroup in the documentation https://api.drupal.org/api/drupal/core%21modules%21field%21field.api.php... says, " A widget is a plugin annotated with class \Drupal\Core\Entity\Annotation\FieldWidget that ..." however, there is no such thing as \Drupal\Core\Entity\Annotation\FieldWidget and this should instead be \Drupal\Core\Field\Annotation\FieldWidget.

This is a simple change to the docblock associated with hook_field_widget_info_alter() in field.api.php. Changing this should also ensure that the class is linked on api.drupal.org.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, thanks!

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again! Committed to 8.x.

  • jhodgdon committed c3f272d on 8.x
    Issue #2308707 by eojthebrave: Fix annotation class reference in field....
jhodgdon’s picture

Status: Fixed » Needs work

Actually, the Field and Field Formatter topics in the same file have the same problem -- looks like all the field annotation classes were moved from Entity to Field. Want to make a patch to fix the other references?

eojthebrave’s picture

Status: Needs work » Needs review
FileSize
1.7 KB

Sure thing. Looks like there where 3 other bad references in the docblocks in field.api.php. Here's a patch to fix them.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Excellent, thanks! I happened to notice this issue yesterday, must have been around the same time as you filed this issue (and I was busy and didn't file the issue, so it made me laugh when I found yours!). But I had noticed all three of these pages... so glad to see them all fixed!

This looks good.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed! Thank you.

  • Dries committed a678efd on 8.x
    Issue #2308707 by eojthebrave: Field widget @defgroup references wrong...

Status: Fixed » Closed (fixed)

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