Notice: Undefined offset: 0 in theme_commerce_backoffice_product_node_add_list() (line 219 of /home/hpkuvac/public_html/asiakas/bcamp/profiles/commerce_kickstart/modules/contrib/commerce_backoffice/commerce_backoffice_product.module).

I'm getting this when going to: node/add/add-product
I think this Notice came after adding new product variation type.

Comments

ace11’s picture

Issue summary: View changes

added more info

jsacksick’s picture

Status: Active » Postponed (maintainer needs more info)

I tried to reproduce the issue and I couldn't, I tried with a new variation type with and without the matching product display type and it worked.

ace11’s picture

Any ideas what could cause this? How to try fix it? Or what kind of info I could give..?

jsacksick’s picture

Try to debug the theme function by adding dsm etc. and tell us what you get.

ace11’s picture

StatusFileSize
new520.44 KB

Does picture attached help?
Or do you need something more?

I noticed that there is 49965 personal trainer 994 and 50000 personal trainers 1151.
There should be only one and right one is 50000 personal trainers 1151.

49965 personal trainer 994 - this is the one I deleted earlier. I think that is causing Notice on backoffice?

I did search on database. And there is one hit for "personal trainer 994". It is in menu_links. Link path points to node/add/personal-trainer. And that content type is already deleted.

ace11’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Okey, took backups and deleted 994 from menu_links. And it is fixed. Cant see Notice any more.

Thanks!

VanessaM’s picture

Component: Miscellaneous » Code
Category: support » bug
Status: Closed (fixed) » Active

I get this error when trying to add a new commerce product from Home » Administration » Store » Products --> add product:

Notice: Undefined offset: 0 in theme_commerce_backoffice_product_node_add_list() (line 219 of commerce_backoffice/commerce_backoffice_product.module).

I think it has something to do with the inline entity form because at some stage when I deleted all products and started adding them again from Home » Administration » Store » Products --> add product, I didn't get the error and then as soon as I started using the inline entity form from the product display and then tried adding a commerce product via Home » Administration » Store » Products --> add product, again, I kept getting the error. After that no matter how many times I deleted all products, I still kept getting the error.

I even disabled the inline entity form module and I still get the error

ace11’s picture

Have you deleted your product variation types or product content types in some point?

You should also check with devel module what is going on. Check my attached image at #4.

VanessaM’s picture

StatusFileSize
new110.52 KB
new106.2 KB

Yes I deleted the product variations and products display.

I am attaching my debug info.

VanessaM’s picture

As soon as I disabled the product display module the error went away :)

vasike’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.81 KB

i can't reproduce this issue.

however i notice that Backoffice introduce the Creation of Product Display on Variation type creation.
But it will let me delete the variation type, without notice that this product type is used in product reference instance.
here is patch that disable the deletion in this case.
Could be this patch also part of Drupal Commerce : Product Reference module?

i'm not sure:
1. this is the place for this patch
2. if the approach is right. what about delete the Product Display togheter with variation type.

vasike’s picture

Issue summary: View changes

fixed typos

geresy’s picture

Issue summary: View changes

I had the same problem! I first disabled the Commerce Kickstart Lite Product feature and after that I removed the Product Display content type.
The error disappeared after I reset the Product Display menu item in the Navigation menu. All good now.