Bug #104201
closedCreation of a file relation in a data record not possible
0%
Description
Hello,
when creating a relation (Image) in a data record, sometimes no relation can be set.
The link handler can be opened in this case, but no image can be selected. After waiting a while, you get a js error in the browser console
The system is a new installation of TYPO 3 v11.5, in which only the TCA and the domain model for the data set were configured.
The configuration is as follows:
packages/main/Classes/Domain/Model/PressPhoto
<?php
namespace playground\main\Domain\Model;
use TYPO3\CMS\Extbase\Annotation\ORM\Cascade;
use TYPO3\CMS\Extbase\Domain\Model\Category;
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
class PressPhoto extends AbstractEntity
{
/**
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
*/
protected $image = NULL;
/**
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
*/
public function getImages(): FileReference
{
return $this->images;
}
/**
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
* @return void
*/
public function setImages(FileReference $images): void
{
$this->images = $images;
}
}
packages/main/Classes/Domain/Repository/PressPhotoRepository;
<?php
namespace playground\main\Domain\Repository;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
class PressPhotoRepository extends Repository
{
}
packages/main/Configuration/TCA/tx_main_domain_model_pressphoto.php
<?php
return [
'ctrl' => [
'title' => 'Pressefotos',
'label' => 'title',
'iconfile' => 'EXT:main/Resources/Public/Icons/Extension.png',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'versioningWS' => false,
'origUid' => 't3_origuid',
'delete' => 'deleted',
'transOrigPointerField' => 'l18n_parent',
'translationSource' => 'l10n_source',
'transOrigDiffSourceField' => 'l18n_diffsource',
'languageField' => 'sys_language_uid',
'enablecolumns' => [
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'searchFields' => 'title',
],
'columns' => [
'image' => [
'exclude' => 1,
'label' => 'Bild',
'config' => [
'type' => 'inline',
'foreign_table' => 'sys_file_reference',
'foreign_field' => 'uid_foreign',
'foreign_sortby' => 'sorting_foreign',
'foreign_table_field' => 'tablenames',
'foreign_match_fields' => [
'fieldname' => 'inline_1',
],
'foreign_label' => 'uid_local',
'foreign_selector' => 'uid_local',
'overrideChildTca' => [
'columns' => [
'uid_local' => [
'config' => [
'appearance' => [
'elementBrowserType' => 'file',
'elementBrowserAllowed' => 'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg',
],
],
],
'crop' => [
'description' => 'field description',
],
],
'types' => [
2 => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette',
],
],
],
'filter' => [
[
'userFunc' => 'TYPO3\\CMS\\Core\\Resource\\Filter\\FileExtensionFilter->filterInlineChildren',
'parameters' => [
'allowedFileExtensions' => 'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg',
'disallowedFileExtensions' => '',
],
],
],
'appearance' => [
'useSortable' => true,
'headerThumbnail' => [
'field' => 'uid_local',
'height' => '45m',
],
'enabledControls' => [
'info' => true,
'new' => false,
'dragdrop' => true,
'sort' => false,
'hide' => true,
'delete' => true,
],
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference',
],
],
],
],
'types' => [
'0' => [
'showitem' => 'image',
],
],
];
Files
Updated by Timo Lauschner 8 months ago
Hi Daniel,
I had the same problem in a TYPO3 12 installation. After updating to the latest Edge version 126.0.2592.68 and the latest Chrome version, the problem was solved.
Updated by Daniel Herold 8 months ago
ยท Edited
Timo Lauschner wrote in #note-1:
Hi Daniel,
I had the same problem in a TYPO3 12 installation. After updating to the latest Edge version 126.0.2592.68 and the latest Chrome version, the problem was solved.
In the version of Edge you mentioned, the error still occurs for me. Chrome and Firefox seem to work.
Updated by Stephan grass 8 months ago
Same here on Mac. Update to the latest Chrome version will work ... Firefox ans Safari no problems.
Updated by Garvin Hicking 8 months ago
- Status changed from New to Closed
I believe this is caused by: https://chromium-review.googlesource.com/c/chromium/src/+/5648261
I will close this issue for now as being very likely browser-related and not really a TYPO3 issue, if you feel this is a mistake or have additional feedback, please get in touch.