Search code examples
typo3typo3-8.xtypo3-extensions

TYPO3 - Deactivating cHash in own extension - 8LTS


I'm trying to deactivate cHash in my extension ... the link for the show action looks like this:

/?tx_abc_abc[record]=1&tx_abc_abc[action]=show&tx_abc_abc[controller]=Abc&cHash=10c78febea3ae5dsdf535fb36ca6d08

In ext_localconf.php I tried to deactivate cHash like this:

ext_localconf.php

<?php
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
    'Vendor.' . $_EXTKEY,
    'Abc',
    array(
        'Abc' => 'list,show',

    ),
    // non-cacheable actions
    array(
        'Abc' => 'list,show',

    )
);

$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_abc_abc[record],tx_abc_abc[action],tx_abc_abc[controller]';

It's not working though. What am I missing?


Solution

  • You need to deactivate the cHash when building the links in your template. If you are using the ViewHelper <f:link.action>, then you need to set the attribute noCacheHash="1".