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

Issue fork drupal-3537572

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

joachim created an issue. See original summary.

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

michagru’s picture

Status: Active » Needs review

I found the BlockPageVariant as an alternative to mention

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

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...
xjm’s picture

Version: 11.x-dev » 11.2.x-dev
Status: Reviewed & tested by the community » Fixed

I read BlockPageVariant and confirmed that this is what it actually does. Since it's always good to check why something like this is wrong (especially to confirm that we have the correct replacement), I did:

git log -S "FullPageVariant"

It looks like this was removed back in 2014 in #2352155: Remove HtmlFragment/HtmlPage. 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!

Edit: Markup woes.

Status: Fixed » Closed (fixed)

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