[TYPO3-dev] dmmjobcontrol broken in 6.1 (&cHash empty)
Jigal van Hemert
jigal.van.hemert at typo3.org
Tue Jul 9 00:36:56 CEST 2013
Hi,
On 8-7-2013 23:11, Kevin Renskers wrote:
> I just got a bug report that my extension dmmjobcontrol is broken in
> TYPO3 6.1, links to detail pages are no longer working. More
> precisely, they all generate the following error:
>
> Request parameters could not be validated (&cHash empty)
>
> It used to work fine in all previous versions and I am using the
> $this->cObj->getTypoLink_URL method (see
> https://github.com/kevinrenskers/dmmjobcontrol/blob/master/pi1/class.tx_dmmjobcontrol_pi1.php#L1035).
> What am I doing wrong?
It's perhaps useful to read the article [1] about cHash.
Your extension is giving a lot of contradicting signals:
- it says to check the cHash (which is normally used for USER (cached)
plugins)
- it says that it is a USER_INT object (okay, so it's an uncached extension)
- it tells TYPO3 to use no_cache (ehm... the entire caching should be
disabled? Really??)
- the plugin is registered as a cached (USER) object
Obviously the extension is not creating links with a cHash and if you have
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError'] = 1
then the code in
\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::reqCHash()
will produce the error message you mention.
Plan carefully which plugins in your extension can be cache and which
cannot be cached. Create links with valid cHashes to the cached plugins.
Remove the set_no_cache() immediately! Seriously...
[1] http://typo3.org/documentation/article/the-mysteries-of-chash-1
--
Jigal van Hemert
TYPO3 CMS Active Contributor
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-dev
mailing list