Frage

Uncaught Error: Call to a member function provide() on null in /vendor/magento/module-swatches/Helper/Data.php:350

I'm using Magento 2.1.8 with the Ethan theme from MGS. When I added swatches to configurable product and view the catalog this error appears and breaks the layout/styling of the page.

The single view page for the product doesn't load anything and display white screen.

I've looked all over for a solution, has anyone experienced this before?

Is there a fix?

War es hilfreich?

Lösung

I was only able to fix this with a core hack.

Above:

$swatchAttributes = $this->swatchAttributesProvider->provide($product);

Put this:

if (!isset($this->swatchAttributesProvider)) { $this->swatchAttributesProvider = ObjectManager::getInstance()->get(SwatchAttributesProvider::class); }

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit magento.stackexchange
scroll top