PageVariantInterface docs mention class that doesn't exist

Created on 23 July 2025, about 1 month ago

Problem/Motivation

PageVariantInterface docs say:

> * For example, the \Drupal\block\Plugin\DisplayVariant\FullPageVariant page

This doesn't exist.

Steps to reproduce

Proposed resolution

Reference the actual plugin that's in block module.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

documentation

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

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

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @joachim
  • First commit to issue fork.
  • Merge request !12832adjusting comment for new example page β†’ (Closed) created by Unnamed author
  • πŸ‡©πŸ‡ͺGermany michagru Bamberg

    I found the BlockPageVariant as an alternative to mention

  • Pipeline finished with Success
    about 1 month ago
    #556091
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Seems straight forward.

    • xjm β†’ committed 718a9557 on 11.x
      Issue #3537572 by michagru, joachim: PageVariantInterface docs mention...
    • xjm β†’ committed 3a6a8be0 on 11.2.x
      Issue #3537572 by michagru, joachim: PageVariantInterface docs mention...
  • πŸ‡ΊπŸ‡ΈUnited States xjm

    I read

    </code> and confirmed that this is what it actually does. Since it's always good to check <em>why</em> something like this is wrong (especially to confirm that we have the correct replacement, I did:
    <code>
    git log -S "FullPageVariant"
    

    It looks like this was removed back in 2014 in [#]. That issue includes e.g.:

    diff --git a/core/lib/Drupal/Core/Display/Annotation/DisplayVariant.php b/core/lib/Drupal/Core/Display/Annotation/DisplayVariant.php
    index 3c05cf3b85e..3bf74920f3c 100644
    --- a/core/lib/Drupal/Core/Display/Annotation/DisplayVariant.php
    +++ b/core/lib/Drupal/Core/Display/Annotation/DisplayVariant.php
    @@ -25,8 +25,9 @@
      *
      * Plugin namespace: Plugin\DisplayVariant
      *
    - * For a working example, see
    - * \Drupal\block\Plugin\DisplayVariant\FullPageVariant
    + * For working examples, see
    + * - \Drupal\Core\Render\Plugin\DisplayVariant\SimplePageVariant
    + * - \Drupal\block\Plugin\DisplayVariant\BlockPageVariant
      *

    ...and git even detects it as a rewritten file:

     .../{FullPageVariant.php => BlockPageVariant.php}  |  12 +-
    

    Finally, I grepped to confirm that there were no other stale references to FullPageVariant:

    [ayrton:drupal | Fri 14:33:16] $ grep -r "FullPageVariant" *
    core/lib/Drupal/Core/Display/PageVariantInterface.php: * For example, the \Drupal\block\Plugin\DisplayVariant\FullPageVariant page

    Committed to 11.x, and cherry-picked to 11.2.x as a patch-safe documentation bug fix. Thanks!

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

Production build 0.71.5 2024