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.
2nd parameter disagrees:
/**
* Builds a renderable array for field values.
*
* @param $entity_type
* The type of $entity; e.g. 'node' or 'user'.
* @param $entities
* An array of entities being displayed, keyed by entity id.
// SNIP
function field_default_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
$entity or $entities?
$instance or $instances?
Comment | File | Size | Author |
---|---|---|---|
#16 | [drupal-core]-[documentation-problem]-[1088930]-[#16].patch | 749 bytes | girijap |
#10 | documentation-1088930-10.patch | 1.12 KB | nanotube |
#3 | 1088930-field_default_view-documentation.patch | 840 bytes | nanotube |
Comments
Comment #1
yched CreditAttribution: yched commentedWTF indeed.
The function definition is correct (of course), and the PHPdoc needs to be fixed.
$entity
The entity being displayed.
$instance
The instance structure for $field on $entity's bundle.
(that's if we want to be consistent with rest of the PHPdocs in field.default.inc)
Care to roll a patch ? ;-)
Comment #2
joachim CreditAttribution: joachim commentedThanks for the info :)
I haven't time over the next few days, so tagging as novice in case someone at a sprint wants to pick it up.
Comment #3
nanotube CreditAttribution: nanotube commentedPatch for documentation update.
Comment #4
joachim CreditAttribution: joachim commentedThanks!
Patch looks good to me.
Comment #5
rfayD8 first. Let's get these fixed on D8 and into D7.
Comment #6
joachim CreditAttribution: joachim commentedThis is surely still RTBC on 8.
Comment #7
rfay#3: 1088930-field_default_view-documentation.patch queued for re-testing.
Comment #9
joachim CreditAttribution: joachim commentedOh it probably needs a post-apocalypse reroll...
Comment #10
nanotube CreditAttribution: nanotube commentedRerolled for post-apocalypse event. Documentation fix already in the most current commit. Apply patch only if we want to be consistent with rest of the PHPdocs in
field.default.inc
.Comment #11
kscheirer#10: documentation-1088930-10.patch queued for re-testing.
Comment #14
swentel CreditAttribution: swentel commentedThis function doesn't exist anymore in D8, moving to D7.
Comment #15
stefan.r CreditAttribution: stefan.r commentedTagging the D7 task as Novice
Comment #16
girijap CreditAttribution: girijap commentedMade the corrections in the paramters definition section.
Attached patch file with the changes
Comment #17
chiranjeeb2410 CreditAttribution: chiranjeeb2410 commented@girijap,
Patch name should be appropriate and not too long. Also, your patch isn't getting tested.
Try to create interdiffs, makes the reviewing process way easier.
Comment #18
kscheirerI think this is the first patch for D7, so no interdiff needed. Setting issue to "needs review" so testbot will find it.
Comment #20
c.nish2k3 CreditAttribution: c.nish2k3 as a volunteer commentedThe doc currently says $entity and $instance and hence this issue is no longer valid. I guess this can be closed.
Comment #21
c.nish2k3 CreditAttribution: c.nish2k3 as a volunteer commented