dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
48 stars 63 forks source link

Error when delete wishlist item #528

Closed vincent2090311 closed 5 years ago

vincent2090311 commented 5 years ago

Steps to replicate

Im using magento 2.2.6 (without any 3th party extension) and php 7.1

CNanninga commented 5 years ago

A note: The reproduction steps require that you haven't ever created a wishlist before adding to it from the cart.

Also of note is that the same thing happens if you follow these same reproduction steps but try to add the product back to the cart from the wishlist, rather than removing it. (For the same reason; part of adding it to the cart involves removing it from the wishlist.)

nagarajuk12 commented 5 years ago

Hello Team,

We have been facing the same issue in Magento 2.2.3 CE. while adding and remove item from wishlist we are getting the below error https://prnt.sc/m23ybx please advise as soon as possible.

Fatal error: Uncaught Error: Call to a member function getId() on boolean in /srv/public_html/vendor/dotmailer/dotmailer-magento2-extension/Observer/Customer/RemoveWishlistItem.php:52 Stack trace: #0 /srv/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): Dotdigitalgroup\Email\Observer\Customer\RemoveWishlistItem->execute(Object(Magento\Framework\Event\Observer))

1 /srv/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Dotdigitalgroup\Email\Observer\Customer\RemoveWishlistItem), Object(Magento\Framework\Event\Observer)) 
2 /srv/public_html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer)) 
3 /srv/public_html/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('wishlist_item_d...', Array)
4 /srv/public_html/vendor/magento/framework/Model/Abstract in /srv/public_html/vendor/dotmailer/dotmailer-magento2-extension/Observer/Customer/RemoveWishlistItem.php on line 52
sta1r commented 5 years ago

Hello - sorry for the wait.

This error was resolved here and released in v3.0.2.

sagaltsev commented 5 years ago

Hello Team,

the bug is fixed in 3.0.2 and it is for magento 2.3.x versions. Can you please provide a fix in 2.6.0 and 2.6.1? We still have this error in magento 2.2.5 - 2.2.7

Best regards Stani

simon-letch commented 5 years ago

Hey @sawebvisum,

You can upgrade to the latest version of our extension using the following composer command:

composer require dotmailer/dotmailer-magento2-extension:"3.1.0 as X.X.X"

Where X.X.X is the version of our extension currently bundled into your Magento instance.

Hope this helps, Simon

sagaltsev commented 5 years ago

@simon-letch,

thank you