Fix variant handling in metatag_page_manager

Created on 20 April 2020, over 4 years ago
Updated 23 September 2024, 3 months ago

The multi-variant handling in metatag_page_manager doesn't appear to work correctly, or maybe it's a bug in Page Manager? Either way, \Drupal\Tests\metatag_page_manager\Functional\MetatagPageManagerTest::_testMultipleVariantPage() is failing and needs to be fixed.

πŸ› Bug report
Status

Active

Version

1.0

Component

Panels integration

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡¦Canada floydm

    I'm not sure if this is the same issue or not, but as far as I can tell metatag_page_manager isn't working (in the sense of "I never see my configured metatags on my page manager page").

    The metatag_page_manager_metatag_route_entity method looks for the variant as a routeMatch parameter.

    if ($variant = $route_match->getParameter('page_manager_page_variant')) {
    

    At least in the work I am doing on D10.3 setting up a page with a couple of variants on a new path, I never see that parameter set. Instead I have to look at defaults:

    $variant_id = $route_match->getRouteObject()->getDefault('_page_manager_page_variant')
    

    My knowledge of the way Page Manager loads Pages and PageVariants is extremely superficial, so this may not be smart or secure, but with this change I do see my metatags loading on my page instances.

  • ivnish Kazakhstan

    @floydm this is a new bug. MR and patch can be found here πŸ› Update Page Manager integration for latest version Active

Production build 0.71.5 2024