i am seeing a lot of these in my log ... any idea what causes it?
Notice: Undefined offset: 0 in Drupal\commerce_cattributes\Plugin\Field\FieldWidget\CorrectProductVariationAttributesWidget->selectVariationFromUserInput() (line 311 of /srv/bindings/d219d1dd3a5540bf83ce053a9db6083f/code/web/modules/contrib/commerce_xattributes/modules/commerce_cattributes/src/Plugin/Field/FieldWidget/CorrectProductVariationAttributesWidget.php) #0 /srv/bindings/d219d1dd3a5540bf83ce053a9db6083f/code/web/core/includes/bootstrap.inc(582): _drupal_error_handler_real(8, 'Undefined offse...', '/srv/bindings/d...', 311, Array) #1 /srv/bindings/d219d1dd3a5540bf83ce053a9db6083f/code/web/modules/contrib/commerce_xattributes/modules/commerce_cattributes/src/Plugin/Field/FieldWidget/CorrectProductVariationAttributesWidget.php(311): _drupal_error_handler(8, 'Undefined offse...', '/srv/bindings/d...', 311, Array) #2 /srv/bindings/d219d1dd3a5540bf83ce053a9db6083f/code/web/modules/contrib/commerce_xattributes/modules/commerce_cattributes/src/Plugin/Field/FieldWidget/CorrectProductVariat
Comments
Comment #2
pyxio commentedand this as well
Warning: count(): Parameter must be an array or an object that implements Countable in Drupal\commerce_cattributes\Plugin\Field\FieldWidget\CorrectProductVariationAttributesWidget->formElement() (line 227 of /srv/bindings/d219d1dd3a5540bf83ce053a9db6083f/code/web/modules/contrib/commerce_xattributes/modules/commerce_cattributes/src/Plugin/Field/FieldWidget/CorrectProductVariationAttributesWidget.php) #0 /srv/bindings/d219d1dd3a5540bf83ce053a9db6083f/code/web/core/includes/bootstrap.inc(582): _drupal_error_handler_real(2, 'count(): Parame...', '/srv/bindings/d...', 227, Array) #1 [internal function]: _drupal_error_handler(2, 'count(): Parame...', '/srv/bindings/d...', 227, Array) #2 /srv/bindings/d219d1dd3a5540bf83ce053a9db6083f/code/web/modules/contrib/commerce_xattributes/modules/commerce_cattributes/src/Plugin/Field/FieldWidget/CorrectProductVariationAttributesWidget.php(227): count('black') #3 /srv/bindings/d219d1dd3a5540bf83ce053a9db6083f/code/web/core/lib/Drupal/Core/Field/WidgetBase.php(335): Drupal\commerce_cattributes\Plugin\Field\FieldWidget\CorrectProductVariationAttributesWidget-
Comment #3
pyxio commentedthe warning count happens when simply viewing the product page
Comment #4
pyxio commentedthrough further testing it seems to be happening when only one default attribute is available ... as in no other choices (only one product variation)
Comment #5
pyxio commentedanother update ... it happens even if there are multiple attributes ... but if ONE of the attributes only has one default option.
Comment #7
drugan commentedSorry for late responding. I have a lot of paid work now and not having free time so much.
Please, try the latest dev version and if it will work for you then I'll make a new beta release.
Comment #8
pyxio commenteddev version seems to have resolved the issue.
Comment #9
drugan commentedDone. Thank you.
https://www.drupal.org/project/commerce_xattributes/releases/8.x-1.0-beta5