Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I have created Importer to load products into commerce module from xml file. Mappings and xpath query are configured. But I get an error message
Warning: strpos() expects parameter 1 to be string, array given в функции commerce_product_validate_sku() (строка 686 в файле D:\OpenServer\domains\drupal7\sites\all\modules\commerce\modules\product\commerce_product.module).
I have been tried to investigate this problem myself but I have not enough experience in Drupal.
The problem is reproduced only if the xml document contains more than one items to import. If only one item in the xml file import succeeds.
I have attached screenshot which explains the entity object. I'm not sure maybe this is XPath XML parser problem.
Comments
Comment #1
twistor CreditAttribution: twistor commentedIt looks like your mapping a multiple values to a single-valued field. Not sure what the exact problem is, but it should probably be validated.
Comment #2
LaFabrik CreditAttribution: LaFabrik commentedSame problem,
the xml parser make arrays that can't be import.
The only solution is to make your import without this module (use only feeds and feeds tamper eventually).
The xml is well parse and import multiples products.