Bug #93133
closedNot processing images when indexing in Solr
100%
Description
TYPO3 in version 10.4.11 introduced regression by this patch https://github.com/TYPO3/TYPO3.CMS/commit/0c5439f2ce
In latest version, when indexing links to images via Solr is broken, because of deferred generation of images. Solr receives link to generate image instead of link to generated image.
Stack:
TYPO3 10.4.11
georgringer/news - 8.5
apache-solr-for-typo3/solr - 11.0.3
code to reproduce in :
In standard Solr configuration for news with code added in plugin.tx_solr.index.queue.news
image_stringM = SOLR_CONTENT
image_stringM {
cObject = COA
cObject {
10 = FILES
10 {
references {
table = tx_news_domain_model_news
uid.data = {field:uid}
uid.insertData = 1
uid.intval = 1
fieldName = fal_media
}
maxItems = 1
renderObj = TEXT
renderObj {
typolink {
parameter.stdWrap {
cObject = IMG_RESOURCE
cObject {
file.import.data = file:current:uid
file.treatIdAsReference = 1
}
}
returnLast = url
forceAbsoluteUrl = 1
}
}
}
}
}
Above code should return link to processed link in Solr index,
but in 10.4.11 BEFORE frontend rendering of news with image attached return links to TYPO3 backend with token to generate image.
But when news is rendered on frontend, and then indexed, above code work as previous version.
Updated by Tomek W almost 4 years ago
Output in Solr Index in 10.4.11 before frontend rendering:
"image_stringM":["{\"type\":\"url\",\"url\":\"https:\\/\\/typo3.ddev.site\\/typo3\\/index.php?route=%2Fimage%2Fprocess&token=backend-token&id=1\",\"target\":\"\",\"aTagParams\":\"\",\"link\":\"https:\\/\\/typo3.ddev.site\\/typo3\\/index.php?route=%2Fimage%2Fprocess&token=backend-token&id=1\"}"],
Expected output:
"image_stringM":["{\"type\":\"file\",\"url\":\"https:\\/\\/typo3.ddev.site\\/fileadmin\\/content\\/test\\/example.jpg\",\"target\":\"\",\"aTagParams\":\"\",\"link\":\"fileadmin\\/content\\/test\\/example.jpg\"}"],
Updated by Tymoteusz Motylewski almost 4 years ago
- Related to Bug #92188: Deferred image processing in the backend is only partly implemented added
Updated by Webadmin no-lastname-given almost 4 years ago
This "feature" makes it also impossible to generate a final image URI within an Extbase Action in Backend-Context. We need it to generate an processed image URI out of the ImageService class for sending it to Apple/Google push notifications.
Updated by Webadmin no-lastname-given almost 4 years ago
- Related to Bug #93139: Revert image processing added
Updated by Sébastien Martin almost 4 years ago
Hello everyone,
We encounter the same problem when generating crops in the backend context with typo3 >= 10.4.11
Here is the code we use:
/** @var \TYPO3\CMS\Core\Resource\FileReference $fileReference */
$fileReference = $fileRepository->findFileReferenceByUid($uid);
$cropString = $fileReference->getProperty('crop');
$cropVariantCollection = CropVariantCollection::create($cropString);
$cropArea = $cropVariantCollection->getCropArea('default');
$processingInstructions = [
'width' => $width,
'height' => $height,
'crop' => $cropArea->makeAbsoluteBasedOnFile($fileReference)
];
$processedFile = $imageService->applyProcessingInstructions(
$fileReference,
$processingInstructions
);
return $processedFile->getPublicUrl();
Do you have any news/workarounds on this problem?
Thank you
Updated by B Novak almost 4 years ago
- Related to Bug #93245: Images not processed in Scheduler task since version 10.4.11 added
Updated by Daniel Goerz over 3 years ago
- Related to Bug #93766: BE user emailMeAtLogin throws TypeError added
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68518
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68518
Updated by Helmut Hummel over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8d956220a13a0870f8c52bbfba8132077e30d5d4.
Updated by Oliver Hader about 2 years ago
- Related to Bug #98174: Not processing images when indexing in Solr added
Updated by Georg Ringer 4 months ago
- Related to Bug #98684: Not processing images when indexing in Solr in TYPO3 11 added