Project

General

Profile

Actions

Bug #104201

closed

Creation of a file relation in a data record not possible

Added by Daniel Herold 23 days ago. Updated 23 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-06-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

Actions #1

Updated by Timo Lauschner 23 days 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.

Actions #2

Updated by Daniel Herold 23 days 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.

Actions #3

Updated by Stephan grass 23 days ago

Same here on Mac. Update to the latest Chrome version will work ... Firefox ans Safari no problems.

Actions #4

Updated by Garvin Hicking 23 days 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.

Actions

Also available in: Atom PDF