Bug #95572
closed
TCA selectSingle with foreign_table and selicon_field does not find images
Added by Lina Wolf about 3 years ago.
Updated almost 2 years ago.
Category:
FormEngine aka TCEforms
Description
If you install the current master with the extension styleguide have a look at table tx_styleguide_elements_select, field select_single_12 the images do not get displayed. While we where doing automatic screenshots for TYPO3 11.4 this still worked. See screenshots attached.
Files
- Status changed from New to Accepted
Some more debugging information:
while static select icons have a syntax like 'EXT:styleguide/Resources/Public/Icons/tx_styleguide.svg'
, icons of releations using ctrl|selicon_field
have a path like /fileadmin/styleguide/telephone_box.jpg
which is created in
AbstractItemProvider
if ($isReferenceField) {
$references = $fileRepository->findByRelation($foreignTable, $iconFieldName, $foreignRow['uid']);
if (is_array($references) && !empty($references)) {
$icon = reset($references);
$icon = $icon->getPublicUrl();
}
}
later in \TYPO3\CMS\Backend\Form\Utility\FormEngineUtility::getIconHtml
the line
$absoluteFilePath = GeneralUtility::getFileAbsFileName($icon);
will transform the fileadmin path into an empty string and the icon can be retrieved
- Related to Bug #97442: Icon form Backend Layout Record are broken in Sidesettings added
- Related to Task #95027: Always generate absolute FAL URLs in the backend added
Found causing commit through git bisect: #95027
The difference is the prefixed slash in /fileadmin/styleguide/telephone_box.jpg
Without the slash it works again: fileadmin/styleguide/telephone_box.jpg
- Status changed from Accepted to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF