Bug #36461

No Caching with Extbase Plugin when "resolving" controller and action with realurl

Added by Christian Ehret about 1 year ago. Updated about 1 month ago.

Status:Needs Feedback Start date:2012-04-23
Priority:Must have Due date:
Assignee:- % Done:

0%

Category:Extbase: Cache
Target version:Extbase 6.2
Has patch:No Tags:
Votes: 2 (View)

Description

As soon as I add the controller and action into realurl config, the page is not cached anymore (and therefore not indexed by indexed_search).

It does not matter if I add the controller and action to fixedPostVars, e.g.

'fixedPostVars' => array(
'_DEFAULT' => array (
/*
array(
'GETvar' => 'tx_myext_pi1[controller]',
'valueMap' => array(
'Product' => 'produkt',
),
’noMatch’ => ‘bypass’,
),
array(
'GETvar' => 'tx_toco3myext_pi1[action]',
'valueMap' => array(
'overview' => 'overview',
'detail' => 'detail',
),
’noMatch’ => ‘bypass’,
),
),

or 'postVarSets' - the page is not cached anymore. Other extension Variables I added to the postVarSets work without problems, e.g.
'cat' => array (
array(
'GETvar' => 'tx_myext_pi1[category]',
'lookUpTable' => array(
'table' => 'tx_myext_domain_model_category',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),

IMPORTANT: at first glance everythings to be fine. The resolving works and the pages and contents are shown like requested BUT the page is not cached anymore.

Is this a bug or am I doing something completely wrong?

To clarify: with caching I mean the standard TYPO3 page caching - not the realurl caching!

I thought this is an realurl issue and added the following bug: http://bugs.typo3.org/view.php?id=18481 which also was confirmed by one user. As you can see in the Bugtracker, Dmitry asked me to resolve this on extbase side, that's why I post it here again.

History

Updated by Jan Kiesewetter 11 months ago

I can confirm this issue.
The admin-panel reports an cHash problem.
This is the output of the admin-panel if default action (list) is called without extbase parameters (from the menu):
The incoming cHash "ede237831fbbae721d30bffc4e44dcfa" and calculated cHash "ae541f40806fc69f595681cafa31473f" did not match, so caching was disabled. The fieldlist used was "encryptionKey"

If the same action is called within the extension the fieldlist contains all parameters but calculating fails also:
The incoming cHash "8a4628d52782ffecd2be2c0de843b193" and calculated cHash "25e2a1a436ba9e59ee7b05fcada244d3" did not match, so caching was disabled. The fieldlist used was "encryptionKey,tx_extension_plugin[action],tx_extension_plugin[controller],tx_extension_plugin[model]"

I don't know why the model is part of the fieldlist in the list action.

It looks like there goes something wrong with the fields for the calculation.

In my show action the caching works fine.

Updated by Ingo Pfennigstorf 10 months ago

  • Category changed from Extbase: Core to Extbase: Cache
  • Status changed from New to Needs Feedback

This may be expected, because if a wrong cHash is provided the plugin is not cached.
Did you try the RealURL cHash parameters?

Updated by Jan Kiesewetter 9 months ago

What do you mean with "RealURL cHash parameters"?
I have set

'enableCHashCache' => true,

Updated by Jan Kiesewetter 8 months ago

may it is a problem with the

'defaultToHTMLsuffixOnPrev' => true,

setting
@ Christian Ehret i think this setting is also set in your environment as i can see on your site ;) .

Updated by Norbert Sendetzky 3 months ago

I can confirm this issue too.

There are two reasons why pages are not cached:
- Setting 'defaultToHTMLsuffixOnPrev' to something else than the default value
- Using optional parameters in the URL

A partly working workaround is to use "fixedPostVars" instead of "postVarSets" like:

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['fixedPostVars']['_DEFAULT'][] = array(
'GETvar' => 'arc[f-catalog-id]',
);

instead of

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets']['_DEFAULT']['arcavias'][] = array(
'GETvar' => 'arc[f-catalog-id]',
);

Using a default parameter with the "valueDefault" option doesn't help.

Updated by Alexander Schnitzler about 1 month ago

  • Target version set to Extbase 6.2

Also available in: Atom PDF