Issue Bug Closed

#106452Typolink uri with LINKHANDLER to non-existent record causes error when autotagging feature is enabled

Jakub Zgirski 03/28/25, 14:47 updated 12/02/25, 14:21

Description

Typo3 13.4.8
Feature Cache autotagging is on (https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.3/Feature-104990-AutomaticFrontendCacheTagging.html)

The editor is working on translations. He has various linkhandlers(https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/LinkHandling/Linkhandler/Index.html) at his disposal. A translated record has a typolink to a record that has not yet been translated. An error appears on FE in a given language version:

TYPO3\CMS\Frontend\Cache\CacheLifetimeCalculator::calculateLifetimeForRow(): Argument #2 ($record) must be of type array, int given, called in /usr/www/users/niceguy/besttypo3projectever.hehe/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php on line 475

typolink uri:

t3://record?identifier=category&uid=419

page.tsconfig:

TCEMAIN.linkHandler.category {
    handler = TYPO3\CMS\Backend\LinkHandler\RecordLinkHandler
    label = LLL:EXT:myext/Resources/Private/Language/locallang_db.xlf:link.tab.category
    configuration {
        table = tx_myext_domain_model_category
        pageTreeMountPoints = 24
        hidePageTree = 0
    }
    scanBefore = page
    displayAfter = product
}

setup.typoscript

config.recordLinks.category {
    forceLink = 0
    typolink {
        parameter = 7
        additionalParams.data = field:uid
        additionalParams.wrap = &tx_myext_products[controller]=Category&tx_myext_products[action]=show&tx_myext_products[category]=|
    }
}

Viewhelper f:link.typolink cause that error. I’ve tested it with f:link.action (with coresponding arguments and pageUid) and link was created without errors.
When i disable autotagging feature, frontend is rendered without errors.

Reviews 2

History 46

  1. Gerrit Code Review pushed patch set 1 for main to change 88848 status Accepted Under Review <span data-processor="relativetime" data-value="2025-03-31T13:29:00+00:00" > 03/31/25, 13:29 </span>

  2. Georg Ringer commented <span data-processor="relativetime" data-value="2025-03-31T13:29:23+00:00" > 03/31/25, 13:29 </span>

    can be more easily tested by using sys_category as tablename

  3. Georg Ringer commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-04-08T10:00:10+00:00" > 04/08/25, 10:00 </span>

    Applied in changeset commit:9ad1a514057d2a8803bb46e677756d6fd7a87f6d.