2022.04 csv import media missing

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!
columbo
Advanced
Posts: 124
Joined: 09 Oct 2019, 09:42

2022.04 csv import media missing

Post by columbo » 18 May 2022, 22:14

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

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

Re: 2022.04 csv import media missing

Post by aimeos » 19 May 2022, 06:28

Does the entries in the mshop_media table (link and preview column) look OK or does they contain empty strings somewhere?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

columbo
Advanced
Posts: 124
Joined: 09 Oct 2019, 09:42

Re: 2022.04 csv import media missing

Post by columbo » 19 May 2022, 07:40

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

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

Re: 2022.04 csv import media missing

Post by aimeos » 19 May 2022, 08:00

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

TGergo
Posts: 41
Joined: 24 Nov 2022, 14:35

Re: 2022.04 csv import media missing

Post by TGergo » 19 Jan 2023, 09:52

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

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

Re: 2022.04 csv import media missing

Post by aimeos » 19 Jan 2023, 13:51

No, fs-mimeicon is correct because there are no previews for PDF files generated and only the mimetype icon shown.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

TGergo
Posts: 41
Joined: 24 Nov 2022, 14:35

Re: 2022.04 csv import media missing

Post by TGergo » 19 Jan 2023, 14:11

Thank You! My shop.php 'fs-mimeicon' => [] settings was wrong.

Post Reply