Page 1 of 1

2022.04 csv import media missing

Posted: 18 May 2022, 22:14
by columbo
Hi,

after upgrade to 2022.04 I'm still facing some issues with csv product media import.
start csv import with:
  • php artisan aimeos:jobs "product/import/csv"
and
  • php artisan aimeos:jobs "media/scale"
-> medias are not displayed: Log: Scaling media item "12345" failed: File "" not found

But when I add a media manually its stored (in \public\aimeos\1.d\preview\ [0 - f] ) and displayed correctly.

in shop.php:

Code: Select all

... 
'resource' => [
	'fs' => [
		'adapter' => 'Standard',
		'basedir' => public_path( 'aimeos' ),
		'baseurl' => rtrim( env( 'ASSET_URL' ), '/' ) . 'aimeos',
	],

... 
'jobs' => [	
	'product' => [
		'import' => [
			'csv' => [
				'domains' => [
					'attribute' => 'attribute',
					'catalog' => 'catalog',
					'media' => 'media',
					'price' => 'price',
					'product' => 'product',
					'product/property' => 'product/property',
					'supplier' => 'supplier',
					'text' => 'text',
				],
				'location' => storage_path() . '/products',
				'container' => [
					'type' => 'Directory',
					'content' => 'CSV',
				],
				'skip-lines' => 1,
				'mapping' => [
					...
					),
				],
			],
		],
	],
],

csv import-files are in \storage\products,
aimeos/ai-filesystem extension installed

Are there any configurations, paths etc. for csv missing?

Thank you

Re: 2022.04 csv import media missing

Posted: 19 May 2022, 06:28
by aimeos
Does the entries in the mshop_media table (link and preview column) look OK or does they contain empty strings somewhere?

Re: 2022.04 csv import media missing

Posted: 19 May 2022, 07:40
by columbo
in mshop_media table:

link: < empty >
preview: {}

It seems that the images cannot be found during the csv import, but all images are located on the server in /public/images/ directory. And the path in csv file eg.: /images/image1.jpg

Re: 2022.04 csv import media missing

Posted: 19 May 2022, 08:00
by aimeos
The path must be relative to the ./public/aimeos/ directory. If you have stored your files in ./public/images/, the relative path in the CSV file must be ../images/image1.jpg

Re: 2022.04 csv import media missing

Posted: 19 Jan 2023, 09:52
by TGergo
I import files.
Everything is alright, but one field incorrect.

mshop_media.fsname = fs-mimeicon

I don't now why, beacuse the file is .pdf, mimetype correct: application/pdf

I think mshop_media.fsname = fs-media should be

Re: 2022.04 csv import media missing

Posted: 19 Jan 2023, 13:51
by aimeos
No, fs-mimeicon is correct because there are no previews for PDF files generated and only the mimetype icon shown.

Re: 2022.04 csv import media missing

Posted: 19 Jan 2023, 14:11
by TGergo
Thank You! My shop.php 'fs-mimeicon' => [] settings was wrong.