Project

General

Profile

Actions

Bug #93133

closed

Not processing images when indexing in Solr

Added by Tomek W over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Image Generation / GIFBUILDER
Target version:
Start date:
2020-12-21
Due date:
% Done:

100%

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

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.


Related issues 5 (1 open4 closed)

Related to TYPO3 Core - Bug #92188: Deferred image processing in the backend is only partly implementedClosed2020-09-03

Actions
Related to TYPO3 Core - Bug #93139: Revert image processingClosedBenni Mack2020-07-242020-07-24

Actions
Related to TYPO3 Core - Bug #93245: Images not processed in Scheduler task since version 10.4.11Closed2021-01-08

Actions
Related to TYPO3 Core - Bug #93766: BE user emailMeAtLogin throws TypeErrorClosedStefan Froemken2021-03-17

Actions
Related to TYPO3 Core - Bug #98174: Not processing images when indexing in SolrNeeds Feedback2022-08-19

Actions
Actions #1

Updated by Tomek W over 3 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\"}"],
Actions #2

Updated by Tymoteusz Motylewski over 3 years ago

  • Related to Bug #92188: Deferred image processing in the backend is only partly implemented added
Actions #3

Updated by Webadmin no-lastname-given over 3 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.

Actions #4

Updated by Webadmin no-lastname-given over 3 years ago

  • Related to Bug #93139: Revert image processing added
Actions #5

Updated by Sébastien Martin over 3 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

Actions #6

Updated by Borisz Novak over 3 years ago

  • Related to Bug #93245: Images not processed in Scheduler task since version 10.4.11 added
Actions #7

Updated by Daniel Goerz over 3 years ago

  • Related to Bug #93766: BE user emailMeAtLogin throws TypeError added
Actions #8

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

Actions #9

Updated by Gerrit Code Review about 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

Actions #10

Updated by Helmut Hummel about 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed
Actions #12

Updated by Oliver Hader almost 2 years ago

  • Related to Bug #98174: Not processing images when indexing in Solr added
Actions

Also available in: Atom PDF