Hello Team, Please help me resolve the following e...
# help
s
Hello Team, Please help me resolve the following error that I am encountering while trying to install the Gift Card feature. Failed to complete request with server authority http://backend-gateway.de.spryker.local. Configured with (SSL Disabled) backend-gateway.de.spryker.local: in /data/config/Shared/config_default.php. Error: Stacktrace: <div style="font-family: Helvetica, Arial, sans-serif; font-size: 14px"><h1>ZED Exception</h1><div style="background: #DADADA; padding: 5px"><font style="12"><b>TypeError - Spryker\Zed\Shipment\Business\ShipmentMethod\MethodReader::applyShipmentFilterWithShipmentGroup(): Argument #4 ($shipmentMethodFilter) must be of type Spryker\Zed\ShipmentExtension\Dependency\Plugin\ShipmentMethodFilterPluginInterface, Spryker\Zed\GiftCard\Communication\Plugin\OnlyGiftCardShipmentMethodFilterPlugin given, called in /data/vendor/spryker/shipment/src/Spryker/Zed/Shipment/Business/ShipmentMethod/MethodReader.php on line 187</b></font></div><p>in /data/vendor/spryker/shipment/src/Spryker/Zed/Shipment/Business/ShipmentMethod/MethodReader.php (208)</p><p><b>Url&lt;/b&gt;/persistent cart/gateway/sync storage quote&lt;/p&gt;&lt;p&gt;&lt;b&gt;Trace</b></p><pre>#0 /data/vendor/spryker/shipment/src/Spryker/Zed/Shipment/Business/ShipmentMethod/MethodReader.php(187): Spryker\Zed\Shipment\Business\ShipmentMethod\MethodReader->applyShipmentFilterWithShipmentGroup(Object(Generated\Shared\Transfer\QuoteTransfer), Object(Generated\Shared\Transfer\ShipmentMethodsTransfer), Object(ArrayObject), Object(Spryker\Zed\GiftCard\Communication\Plugin\OnlyGiftCardShipmentMethodFilterPlugin)) #1 /data/vendor/spryker/shipment/src/Spryker/Zed/Shipment/Business/ShipmentMethod/MethodReader.php(165): Spryker\Zed\Shipment\Business\ShipmentMethod\MethodReader->applyShipmentFilters(Object(Generated\Shared\Transfer\QuoteTransfer), Object(Generated\Shared\Transfer\ShipmentMethodsTransfer), Object(ArrayObject)) #2 /data/vendor/spryker/shipment/src/Spryker/Zed/Shipment/Business/ShipmentMethod/MethodReader.php(117): Spryker\Zed\Shipment\Business\ShipmentMethod\MethodReader->applyFilters(Object(Generated\Shared\Transfer\ShipmentMethodsCollectionTransfer), Object(ArrayObject), Object(Generated\Shared\Transfer\QuoteTransfer)) #3 /data/vendor/spryker/shipment/src/Spryker/Zed/Shipment/Business/ShipmentFacade.php(136): Spryker\Zed\Shipment\Business\ShipmentMethod\MethodReader->getAvailableMethodsByShipment(Object(Generated\Shared\Transfer\QuoteTransfer)) #4 /data/vendor/spryker/shipment-cart-connector/src/Spryker/Zed/ShipmentCartConnector/Dependency/Facade/ShipmentCartConnectorToShipmentFacadeBridge.php(35): Spryker\Zed\Shipment\Business\ShipmentFacade->getAvailableMethodsByShipment(Object(Generated\Shared\Transfer\QuoteTransfer)) #5 /data/vendor/spryker/shipment-cart-connector/src/Spryker/Zed/ShipmentCartConnector/Business/Cart/ShipmentCartExpander.php(73): Spryker\Zed\ShipmentCartConnector\Dependency\Facade\ShipmentCartConnectorToShipmentFacadeBridge->getAvailableMethodsByShipment(Object(Generated\Shared\Transfer\QuoteTransfer)) #6 /data/vendor/spryker/shipment-cart-connector/src/Spryker/Zed/ShipmentCartConnector/Business/ShipmentCartConnectorFacade.php(32): Spryker\Zed\ShipmentCartConnector\Business\Cart\ShipmentCartExpander->updateShipmentPrice(Object(Generated\Shared\Transfer\CartChangeTransfer)) #7 /data/vendor/spryker/shipment-cart-connector/src/Spryker/Zed/ShipmentCartConnector/Communication/Plugin/Cart/CartShipmentCartOperationPostSavePlugin.php(36): Spryker\Zed\ShipmentCartConnector\Business\ShipmentCartConnectorFacade->updateShipmentPrice(Object(Generated\Shared\Transfer\CartChangeTransfer)) #8 /data/vendor/spryker/cart/src/Spryker/Zed/Cart/Business/Model/Operation.php(571): Spryker\Zed\ShipmentCartConnector\Communication\Plugin\Cart\CartShipmentCartOperationPostSavePlugin->postSave(Object(Generated\Shared\Transfer\QuoteTransfer)) #9 /data/vendor/spryker/cart/src/Spryker/Zed/Cart/Business/Model/Operation.php(349): Spryker\Zed\Cart\Business\Model\Operation->executePostSavePlugins(Object(Generated\Shared\Transfer\QuoteTransfer)) #10 /data/vendor/spryker/cart/src/Spryker/Zed/Cart/Business/Model/Operation.php(302): Spryker\Zed\Cart\Business\Model\Operation->reloadItemsInQuote(Object(Generated\Shared\Transfer\QuoteTransfer)) #11 /data/vendor/spryker/cart/src/Spryker/Zed/Cart/Business/CartFacade.php(102): Spryker\Zed\Cart\Business\Model\Operation->reloadItems(Object(Generated\Shared\Transfer\QuoteTransfer)) #12 /data/vendor/spryker/persistent-cart/src/Spryker/Zed/PersistentCart/Dependency/Facade/PersistentCartToCartFacadeBridge.php(86): Spryker\Zed\Cart\Business\CartFacade->reloadItems(Object(Generated\Shared\Transfer\QuoteTransfer)) #13 /data/vendor/spryker/persistent-cart/src/Spryker/Zed/PersistentCart/Business/Model/QuoteStorageSynchronizer.php(94): Spryker\Zed\PersistentCart\Dependency\Facade\PersistentCartToCartFacadeBridge->reloadItems(Object(Generated\Shared\Transfer\QuoteTransfer)) #14 /data/vendor/spryker/persistent-cart/src/Spryker/Zed/PersistentCart/Business/PersistentCartFacade.php(162): Spryker\Zed\PersistentCart\Business\Model\QuoteStorageSynchronizer->syncStorageQuote(Object(Generated\Shared\Transfer\QuoteSyncRequestTransfer)) #15 /data/vendor/spryker/persistent-cart/src/Spryker/Zed/PersistentCart/Communication/Controller/GatewayController.php(111): Spryker\Zed\PersistentCart\Business\PersistentCartFacade->syncStorageQuote(Object(Generated\Shared\Transfer\QuoteSyncRequestTransfer)) #16 /data/vendor/spryker/zed-request/src/Spryker/Zed/ZedRequest/Communication/Plugin/GatewayControllerListenerPlugin.php(61): Spryker\Zed\PersistentCart\Communication\Controller\GatewayController->syncStorageQuoteAction(Object(Generated\Shared\Transfer\QuoteSyncRequestTransfer), Object(Spryker\Zed\ZedRequest\Business\Client\Request)) #17 /data/vendor/symfony/http-kernel/HttpKernel.php(163): Spryker\Zed\ZedRequest\Communication\Plugin\GatewayControllerListenerPlugin->Spryker\Zed\ZedRequest\Communication\Plugin\{closure}() #18 /data/vendor/symfony/http-kernel/HttpKernel.php(75): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #19 /data/vendor/spryker/application/src/Spryker/Shared/Application/Application.php(138): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #20 /data/vendor/spryker/application/src/Spryker/Shared/Application/Application.php(116): Spryker\Shared\Application\Application->handle(Object(Symfony\Component\HttpFoundation\Request)) #21 /data/public/BackendGateway/index.php(20): Spryker\Shared\Application\Application->run() #22 {main}</pre></div><br /> <b>Fatal error</b>: Uncaught ValueError: Path cannot be empty in [no active file]:0 Stack trace: #0 {main} thrown in <b>[no active file]</b> on line <b>0</b><br />
w
The problem is that in the Spryker core the interface was moved to another module (
shipment-extension
), but the plugin misses to implement the new interface and a fallback in the old interface is missing for backward compatibility. You can report this bug to Spryker via their support portal, as they do not actively read bugs here. For a fast solution, extend the
OnlyGiftCardShipmentMethodFilterPlugin
in your project, add the
Spryker\Zed\ShipmentExtension\Dependency\Plugin\ShipmentMethodFilterPluginInterface
to it and replace the usage in
ShipmentDependencyProvider::getMethodFilterPlugins()
to use the one you just create in your project