Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such entity error when saving product in single-store mode if website_id <> 1 #13405

Closed
kyegil opened this issue Jan 28, 2018 · 6 comments
Closed
Assignees
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@kyegil
Copy link

kyegil commented Jan 28, 2018

After upgrading to Magento 2.2.1 I'm no longer able to save products while the website is in single store mode. The website has previously had multiple store views.
I've been able to replicate the issue on a clean install of Magento 2.2.2
The problem is likely related to the fact that website_id != 1

Preconditions

  • Magento version 2.2.1 or 2.2.2
  • PHP version 7.0.22
  • Mysql version 5.6.35
  • Apache/2.2.32 (Unix)

Steps to reproduce

  1. Install a clean version of Magento version 2.2.2
  2. Add a new website, store and store view, and make this the default
  3. Delete the preinstalled website, store and store view
  4. Add a new product and save it
  5. Change the configurations to single-store mode
  6. Open the product and save it again

Expected result

  1. The product should save successfully

Actual result

  1. The save action fails, with the message 'No such entity.'

image
image

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jan 28, 2018
@magento-engcom-team
Copy link
Contributor

@kyegil, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Jan 29, 2018
@ComputerNorth
Copy link

I had the same problem. When I disabled the single-store mode, I could save successfully.

@Techiescot
Copy link

This is the same error as I have ... But the single store mode makes no difference to me.

@kyegil
Copy link
Author

kyegil commented Apr 30, 2018

While waiting for a bug fix I solved this issue by making the following change to the core Product model (in the hope that this will be fixed by next time I update Magento):

In the Magento\Catalog\Model\Product::getStoreIds() method
(approx line 792 of vendor/magento/module-catalog/Model/Product.php):

Find
foreach ($websiteIds as $websiteId) {
Replace with
foreach ($websiteIds as $websiteId => $selected) {

@eduard13 eduard13 self-assigned this Sep 7, 2018
@sidolov sidolov added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Sep 22, 2018
@sidolov
Copy link
Contributor

sidolov commented Sep 22, 2018

Hi @kyegil. Thank you for your report.
The issue has been fixed in #18001 by @eduard13 in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.8 release.

@sidolov sidolov closed this as completed Sep 22, 2018
@sidolov sidolov added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Oct 16, 2018
@sidolov
Copy link
Contributor

sidolov commented Oct 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

6 participants