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

Notice: Undefined offset: 0 in vendor/magento/module-inventory-configurable-product-admin-ui/Observer/ProcessSourceItemsObserver.php on line 83 #3365

Open
ioweb-gr opened this issue Nov 13, 2022 · 1 comment

Comments

@ioweb-gr
Copy link

Preconditions (*)

  1. 2.4.1
  2. One configurable product and children with sources assigned
  3. Multiple websites and store views
    E.g.

image

Steps to reproduce (*)

  1. Try to save the configurable product in a different store view than the Default

image

Expected result (*)

  1. Product is saved correctly

Actual result (*)

  1. The product is saved but a notice appears

image

I've tried debugging this a bit and it seems that in line
vendor/magento/module-inventory-configurable-product-admin-ui/Observer/ProcessSourceItemsObserver.php:75

The productsData array is indexed by 0...N

image

But later on the function $product->getExtensionAttributes()->getConfigurableProductLinks()

Will return an array indexed by the productId and not with a number 0...N

image

However when repeating this on the default store view the case is different and everything works fine.

image

Any ideas why it's loading the product links differently per store?

@m2-assistant
Copy link

m2-assistant bot commented Nov 13, 2022

Hi @ioweb-gr. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant