I have a quite simple piece of code (reduced it to that):
try { $newProduct = $this->productRepository->get($productData['sku']); echo 'Loaded.' . PHP_EOL; $savedProduct = $this->productRepository->save($newProduct); } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { echo 'Saving failed; product does not exist. ' . $e->getMessage() . PHP_EOL; // $newProduct = $this->productInterfaceFactory->create(); } catch (\Exception $e) { echo 'Just some other problem: ' . $e->getMessage() . PHP_EOL; }
and it outputs this:
Loaded. Just some other problem: Invalid method Magento\Eav\Model\Entity\Attribute::isScopeGlobal
... I have no clue why this could happen. Any ideas?