Creating a second gift card type results in fatal error

Created on 26 November 2021, almost 3 years ago
Updated 6 August 2024, 4 months ago

Problem/Motivation

Our use cases for commerce_giftcard present the need for two distinct gift card types to differentiate between the two of them. For a while now we've used a single type that is assigned to users and has been working great.

However, we'd like to add purchasable giftcards to the site and that's where I'm starting to run into issues.

Immediately upon creating the second giftcard type, this error presents a WSOD.

Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "commerce_giftcard" entity type did not specify a storage handler. in Drupal\Core\Entity\EntityTypeManager->getHandler() (line 260 of core/lib/Drupal/Core/Entity/EntityTypeManager.php). 

I'm not sure if it's possible that having the patch in #3184543 could cause this as I was hoping to use those standard events later on down the road. But it's also worth exploring.

Steps to reproduce

  1. Create one giftcard type.
  2. Try to add a second giftcard type.

After clearing caches the error goes away and the giftcard type WAS actually created. Seems like clearing caches temporarily resolves the issue and from there the issue persists, although intermittently. Doing some more testing to see if there is any rhyme or reason to the error popping up.

Proposed resolution

Not 100% certain yet but I'm trying to look at the code to fix it.

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States josh.stewart Lexington, KY

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.

Production build 0.71.5 2024