XML import of product attributes does not work in 19.10.4
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
XML import of product attributes does not work in 19.10.4
Hello,
after updating from Aimeos 19.9.3 to 19.10.4 (TYPO3 9.5.13), the import of product xml files no longer imports the attributes of products.
The format of the import file has not changed. The attribute items in the import file look like this:
<lists>
<attribute>
<attributeitem ref="product|productgroup|productgroup_4" lists.type="default" lists.position="0" lists.status="1"/>
<attributeitem ref="product|season|season_1" lists.type="default" lists.position="1" lists.status="1"/>
<attributeitem ref="product|program|program_1_10" lists.type="default" lists.position="2" lists.status="1"/>
</attribute>
...
All referenced attributes are existing and are active.
As a test, I started the export of the products and afterwards imported one productitem of this file. (The syntax of the xml file is correct.) This results in an error:
Argument 1 passed to Aimeos\MShop\Product\Item\Standard::setConfig() must be of the type array, string given.
Also, the export of the product.label does not contain the correct value. It's exporting the code, not the label set for the product.
I was able to fix the first problem in the xml file by removing the offending line:
<product.config><![CDATA[[]]]></product.config>
Afterwards, I was able to import the file. But same result: The attributes are missing!
Could you please have a look at these problems?
All products in our shop are created by this import. None of the products now has attributes anymore. Since these are partly variant attributes, no products can be bought!
Claudia
after updating from Aimeos 19.9.3 to 19.10.4 (TYPO3 9.5.13), the import of product xml files no longer imports the attributes of products.
The format of the import file has not changed. The attribute items in the import file look like this:
<lists>
<attribute>
<attributeitem ref="product|productgroup|productgroup_4" lists.type="default" lists.position="0" lists.status="1"/>
<attributeitem ref="product|season|season_1" lists.type="default" lists.position="1" lists.status="1"/>
<attributeitem ref="product|program|program_1_10" lists.type="default" lists.position="2" lists.status="1"/>
</attribute>
...
All referenced attributes are existing and are active.
As a test, I started the export of the products and afterwards imported one productitem of this file. (The syntax of the xml file is correct.) This results in an error:
Argument 1 passed to Aimeos\MShop\Product\Item\Standard::setConfig() must be of the type array, string given.
Also, the export of the product.label does not contain the correct value. It's exporting the code, not the label set for the product.
I was able to fix the first problem in the xml file by removing the offending line:
<product.config><![CDATA[[]]]></product.config>
Afterwards, I was able to import the file. But same result: The attributes are missing!
Could you please have a look at these problems?
All products in our shop are created by this import. None of the products now has attributes anymore. Since these are partly variant attributes, no products can be bought!
Claudia
Re: XML import of product attributes does not work in 19.10.4
I fixed the minor issue of the product.label containing the wrong content. Pull request is started.
Re: XML import of product attributes does not work in 19.10.4
And another note: Exporting the product.config containing some content can't be imported, either. Export file contains:
<product.config><![CDATA[{"css-class":"fds"}]]></product.config>
Starting the import resulted in
[ TypeError ]
Argument 1 passed to Aimeos\MShop\Product\Item\Standard::setConfig() must be of the type array, string given,
called in [my-path]/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/lib/mshoplib/src/MShop/Product/Item/Standard.php on line 343
<product.config><![CDATA[{"css-class":"fds"}]]></product.config>
Starting the import resulted in
[ TypeError ]
Argument 1 passed to Aimeos\MShop\Product\Item\Standard::setConfig() must be of the type array, string given,
called in [my-path]/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/lib/mshoplib/src/MShop/Product/Item/Standard.php on line 343
Re: XML import of product attributes does not work in 19.10.4
Thanks, the config issue has been fixed in dev-master and 2019.10.x-dev.
Do you have a clue why the attribute references are missing now?
Do you have a clue why the attribute references are missing now?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: XML import of product attributes does not work in 19.10.4
When I compare the mshop_attribute table of a former aimeos, then the key in this table is e.g. "product|size|size_36", so it is combined of domain, type and code.
After updating to 19.10.4, the key is crypted version of "product|size|size_36", e.g. 95e1468b99a23be8d30dc27e51252ee7 .
Maybe this change is be the cause of the problem?
After updating to 19.10.4, the key is crypted version of "product|size|size_36", e.g. 95e1468b99a23be8d30dc27e51252ee7 .
Maybe this change is be the cause of the problem?
Re: XML import of product attributes does not work in 19.10.4
I gave the import a quick try and exchanged the ref="product|size|size_36" with ref="95e1468b99a23be8d30dc27e51252ee7".
However, nothing changed. Still no attributes.
However, nothing changed. Still no attributes.
Re: XML import of product attributes does not work in 19.10.4
No, the value is updated by the setup script to a hash to avoid problems with domain|type|code combinations that are longer than the key column. The domain|type|code combination is hashed by md5() before it's compared to the key in the database.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: XML import of product attributes does not work in 19.10.4
Then why doesn't it find the key? I did already compare the md5sum, this matches the value stored in the table.
Can you reproduce this? I.e. exporting the products which contain attributes and then importing it again?
Can you reproduce this? I.e. exporting the products which contain attributes and then importing it again?
Re: XML import of product attributes does not work in 19.10.4
We have been able to reproduce the error and it occurred due to a duplicate md5 encoding. A new release of the core and the job controller package has been tagged. Can you please update and test again?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: XML import of product attributes does not work in 19.10.4
It's no composer installation so I exchanged ai-controller-jobs, aimeos-core and ai-typo3 (because of an error) manually.
But now I get other errors when calling the XML import:
Call to undefined function Aimeos\MShop\Common\Manager\Decorator\map()
But now I get other errors when calling the XML import:
Call to undefined function Aimeos\MShop\Common\Manager\Decorator\map()