[TYPO3-dev] dmmjobcontrol broken in 6.1 (&cHash empty)

Kevin Renskers info at bolhoed.net
Tue Jul 9 01:22:46 CEST 2013


On 08 Jul 2013, at 22:36, Jigal van Hemert <jigal.van.hemert at typo3.org> wrote:

> 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

Thank you for your quick help. I currently:

- set pi_USER_INT_obj to false
- set pi_checkCHash to true
- removed set_no_cache 

(see changes in https://github.com/kevinrenskers/dmmjobcontrol/blob/master/pi1/class.tx_dmmjobcontrol_pi1.php)

The detail pages now show up without an error, however the cHash isn’t showing in the url. I now also have the problem that detail pages for different jobs are showing the same html content, so the same cache is used. This is probably why we disabled the cache when we originally developed the plugin back in 2007 :/

So, where to go from here? Would adding the cHash to the url be enough to fix my caching problem? I thought using the $this->cObj->getTypoLink_URL method would be enough to generate urls with cHash values, but that doesn’t seem like that’s the case. What more am I doing wrong?

Again, thanks for the help.


More information about the TYPO3-dev mailing list