If I enable admin_toolbar_tools, I get this error:

TypeError: Drupal\commerce_product\Entity\ProductType::getDescription(): Return value must be of type string, null returned in Drupal\commerce_product\Entity\ProductType->getDescription()

on some admin menu page, as /admin/structure/menu/manage/admin

If the module is uninstalled, the pages work well.

Error log:

Message TypeError: Drupal\commerce_product\Entity\ProductType::getDescription(): Return value must be of type string, null returned in Drupal\commerce_product\Entity\ProductType->getDescription() (line 105 of /home/customer/www/app.limes.farm/public_html/modules/contrib/commerce/modules/product/src/Entity/ProductType.php)
#0 /home/customer/www/app.limes.farm/public_html/modules/contrib/admin_toolbar/admin_toolbar_tools/src/Plugin/Menu/MenuLinkEntity.php(72): Drupal\commerce_product\Entity\ProductType->getDescription()
#1 /home/customer/www/app.limes.farm/public_html/core/lib/Drupal/Core/Menu/MenuLinkBase.php(124): Drupal\admin_toolbar_tools\Plugin\Menu\MenuLinkEntity->getDescription()

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

sepa_cleversoft created an issue. See original summary.

sepa_cleversoft’s picture

Title: TypeError in commerce_products if enable admin_toolbar_extra » TypeError in commerce_product if enable admin_toolbar_extra
sahilgidwani’s picture

Not able to reproduce the issue on my local D10 commerce environment. Can you please add the details of which version of commerce module you are using and also drupal core version.

sepa_cleversoft’s picture

Thank you sahilgidwani for the quick answer. The stack is:
- PHP version 8.1.14
- drupal 9.5.2
- commerce and commerce_product 2.33.0

Let me know if you need more infos.

avpaderno’s picture

Version: 3.3.0 » 3.x-dev

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

  • japerry committed d549bdb3 on 3.x
    Issue #3336787: TypeError in commerce_product if enable...
japerry’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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