Media not showing in backend

Questions around the TYPO3 integration and plugins
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!
rowild

Media not showing in backend

Post by rowild » 25 Aug 2020, 22:06

TYPO3 9.5, aimeos 20.7, php 7.3

When assigning an image to a supplier's media field, the image does not show up in the backend after saving. In the source the path to the image looks like this:

/preview/1/0/10c80ce1_39494735.jpg

As soon as I prepend "/uploads/tx_aimeos" in the source code the image is shown.

The config in "ext/aimeos/Resources/Private/Config/resource.php" looks fine:

Code: Select all

	'fs' => [
		'adapter' => 'Standard',
		'baseurl' => '/uploads/tx_aimeos',
		'basedir' => $publicPath . '/uploads/tx_aimeos',
		'tempdir' => $publicPath . '/typo3temp',
	],
When I add this missing path info snippet to the img tag in
"ext/aimeos/Resources/Private/Extensions/ai-admin-jqadmin/admin/jqadmin/src/Admin/templates/supplier/item-media-standard.php", then it works and the image is displayed:

Code: Select all

<img v-if="item['media.preview']" class="item-preview"

	// ORIG
	// v-bind:src="url('<?= $this->content( '/' ) ?>', item['media.preview'])"

	// MANUALLY ADDED SNIPPET
	v-bind:src="url('<?= $this->content( '/uploads/tx_aimeos/' ) ?>', item['media.preview'])"
	v-bind:alt="item['media.label']" />
How can I fix that?

PS: The same thing is happening for product media as well (probably for all media fields of any domain).
Last edited by rowild on 26 Aug 2020, 09:42, edited 1 time in total.

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

Re: Media not showing in backend

Post by aimeos » 26 Aug 2020, 08:09

You are right, in TYPO3 the prefix from "resource/fs/baseurl" isn't used. We've fixed that and you can install the latest commit using:

Code: Select all

composer req aimeos/ai-admin-jqadm:2020.07.x-dev
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rowild

Re: Media not showing in backend

Post by rowild » 26 Aug 2020, 09:41

Thank you very much!

(I have bad experiences with composer and x-dev versions... I'd rather wait, which is not so much a problem, since images are shown in the FE correctly)

Post Reply