0

Can't be sure when or how this broke, but when visiting the Wishlist page or attempting to add a product to my Wishlist I am presented with 'Cannot specify product.' (See attachment)

This functionality was previously working fine. This is happening on my local version and on staging version. Is there a quick/easy way to decipher where the problem is stemming from?

Example of what shows up in browser

Edit: I've clearly broken something. Console is throwing up a 400, also with the message 'Cannot specify product.'

Console 400

Console response

From what I can gather all my products exist and have IDs. Has anyone experienced anything similar to this with Magento 2?

4
  • You might need to post the code about the form whith leads to this. Theres a few places which throw this error and they all seem to fall around the idea that there is no product id being present. – John Cuthbert Aug 17 '16 at 8:09
  • Is there any easy way to check if the product has an ID? All products have been imported with a CSV, is there a chance this has affected the IDs? – KillahB Aug 18 '16 at 0:46
  • Tried to flush Magento Cache, re-index database, delete static content and re-build. Additionally, need to clear or disable browser cache, clear local storage also. – Khoa TruongDinh Aug 18 '16 at 1:47
  • Thanks for the comment. So, I've tried, di:compile, static-content:deploy, cache:flush and indexer:reindex and the same problem is occurring. Is there a chance I have incorrectly configured products? – KillahB Aug 18 '16 at 4:12
0

If we take a look: vendor/magento/module-wishlist/Model/Item.php - getProduct(), it will throw an exception when the product is not exist. Please, make sure this product is available or not delete.

1
  • The products absolutely exist. Can see them in the front-end and back-end. – KillahB Aug 18 '16 at 0:46
0

So, this turned out to be an issue regarding the user account trying to add to the Wishlist. The account was created locally and had been moved between installs, so something weird/funky happened.

To resolve this I simply deleted the account and created a new one. All other user account created also work fine now.

0
1) wishlist
2) wishlist_item
3) wishlist_item_option

Truncate all of these tables if you are in the development environment. Or delete perticular entries related to selected customer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.