I did a fresh install of latest commerce 2.20 and Marketplace dev. on drupal 9.

I followed all the steps in the help document and created a marketplace owner user, added a store and then went to my store page and click add product.

I get the following error messages.

Notice: Undefined property: Drupal\commerce_marketplace\Form\MarketplaceProductForm::$entityManager in Drupal\commerce_marketplace\Form\MarketplaceProductForm->buildForm() (line 18 of MarketplaceProductForm.php)

Error: Call to a member function getStorage() on null in Drupal\commerce_marketplace\Form\MarketplaceProductForm->buildForm() (line 18 of MarketplaceProductForm.php)

This is whats on line 18


if ($product = \Drupal::request()->attributes->get('commerce_product')) {

Am I missing some setting in my default product setup?

Thanks
Edit: Admin cant add products either.

Comments

Vlooi Vlerke created an issue. See original summary.

vlooi vlerke’s picture

Issue summary: View changes

  • drugan committed 7256e5f on 8.x-1.x
    Issue #3175504 by Vlooi Vlerke: Marketplace owner get an error when...
drugan’s picture

Category: Support request » Bug report

@Vlooi Vlerke

Please, try it now.

drugan’s picture

Status: Active » Needs review
vlooi vlerke’s picture

Status: Needs review » Reviewed & tested by the community

@drugan

It works! Thanks

drugan’s picture

Status: Reviewed & tested by the community » Fixed

Fixed.

Status: Fixed » Closed (fixed)

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