Error of csv import

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
zaheer
Posts: 19
Joined: 12 Nov 2020, 10:22

Error of csv import

Post by zaheer » 25 Mar 2021, 07:50

I am getting the following error on csv import. The madmin_log table shows no errors and the products does not get imported.
Can anyone shed some light on cause of the error.

Code: Select all

php artisan aimeos:jobs product/import/csv dlars
Executing the Aimeos jobs for "dlars"

   TypeError

  Return value of Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard::getListItems() must be an instance of Aimeos\Map, array returned

  at E:\ZAH\Laravel\moudhah\ext\ai-controller-jobs\controller\common\src\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard.php:248
    244▕         */
    245▕        protected function getListItems( $prodid, array $types ) : \Aimeos\Map
    246▕        {
    247▕                if( empty( $types ) ) {
  ➜ 248▕                        return [];
    249▕                }
    250▕
    251▕                $manager = \Aimeos\MShop::create( $this->getContext(), 'catalog/lists' );
    252▕                $search = $manager->createSearch()->setSlice( 0, 0x7FFFFFFF );

  1   E:\ZAH\Laravel\moudhah\ext\ai-controller-jobs\controller\common\src\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard.php:135
      Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard::getListItems("345", [])

  2   E:\ZAH\Laravel\moudhah\ext\ai-controller-jobs\controller\common\src\Controller\Common\Product\Import\Csv\Processor\Stock\Standard.php:75
      Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard::process(Object(Aimeos\MShop\Product\Item\Standard))

User avatar
aimeos
Administrator
Posts: 7915
Joined: 01 Jan 1970, 00:00

Re: Error of csv import

Post by aimeos » 28 Mar 2021, 06:58

There are two possible sources for the problem:
1.) You've configured "controller/common/product/import/csv/processor/catalog/listtypes" to be an empty array
2.) You've deleted the catalog list types in the backend or they haven't been imported during initial setup

In the later case, make sure that the Types > Catalog list panel in the admin backend if it contains entries with domain "product" and code "default" and "promotion". If they are not there, run

Code: Select all

php artisan aimeos:setup
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply