page_variant entity type does not exist for Webform results when uninstalling

Created on 19 April 2023, about 1 year ago
Updated 26 May 2023, about 1 year ago

Problem/Motivation

While moving from Panels & Page Manager to Layout Builder for a site, I've uninstalled both. Then when viewing Webform results, an error occurs.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "page_variant" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of core\lib\Drupal\Core\Entity\EntityTypeManager.php).

Drupal\Core\Entity\EntityTypeManager->getHandler('page_variant', 'storage') (Line: 192)
Drupal\Core\Entity\EntityTypeManager->getStorage('page_variant') (Line: 541)
Drupal\webform\Entity\WebformSubmission->getSourceEntity() (Line: 210)
webform_access_webform_submission_access(Object, 'view', Object)

Re-enabling Page Manager fixed the issue but the site in development no longer needs Page Manager.

πŸ’¬ Support request
Status

Fixed

Version

6.2

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States crutch

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

Comments & Activities

  • Issue created by @crutch
  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland

    That's a webform issue, not a page_manager issue. For some reason you have webform results attached to page variants, one option is to find and delete them first and/or webform needs to be patched to check that the source entity type in question still exists.

  • πŸ‡ΊπŸ‡ΈUnited States crutch

    Great thank you Berdir.

    Yes, we did have a variant displaying form results via a views block for certain roles to manage form results.

    Agree, it would be great if webform could include a check on the source entity type, otherwise it's required to know to delete webform variants before uninstall. However, this would only be an issue for those that are uninstalling panels/page manager and displaying webform results in a page variant, so I can see how this could be uncommon.

    Keeping Page Manager installed is the current fix. Page Manager UI and Panels are uninstalled.

    --

    I have 2 versions of the same site one using layout builder the other with panels/page manager.

    Tried re-enabling panels/page manager and recreating the page, I think the variant id may be different this didn't work. Tried config sync got some errors trying to import and I just couldn't get it to work.

  • Status changed to Needs review about 1 year ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    533 pass
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY
  • Status changed to Fixed about 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024