Bug #20845

disableNoCacheParameter breaks FE Cache

Added by Georg Kühnberger about 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2009-08-07
Due date:
% Done:

0%

TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

disableNoCacheParameter breaks FE Cache

to be more precice: disableNoCacheParameter = 1
leads to page cache-entries including editpanel and pencils for FE-Editing.

Result: normal anonymous or FE-Users see editpanel and pencils in the Frontend.as the where cached that way.

Howto reproduce:
- clear FE_cache
- set [FE][disableNoCacheParameter] = 1
- enable editpanels / adminpanel
- Login as Backenduser call up the frontend to see the editpanel/pencils
- Now this page is being cached (incl. pencils)
- Checkout the FE or the above page with another browser and your will see the editpanel/pencils.

Reasons seems to be around the following functions:
- class tslib_fe - function set_no_cache()
- and /or t3lib/class.t3lib_tsfebeuserauth.php on line 835.

(issue imported from #M11663)

bug_11663_part1.diff View (3.81 KB) Administrator Admin, 2009-08-07 16:17

bug_11663_part2.diff View (1.13 KB) Administrator Admin, 2009-08-07 16:18

bug_11663_part3.diff View (1.23 KB) Administrator Admin, 2009-08-07 16:21

bug_11663_part4.diff View (1.22 KB) Administrator Admin, 2009-08-07 16:25

bug_11663_part1_4-2.diff View (1.73 KB) Administrator Admin, 2009-08-07 16:54

bug_11663_part3_4-2.diff View (1.23 KB) Administrator Admin, 2009-08-07 16:54

bug_11663_part4_4-2.diff View (1.23 KB) Administrator Admin, 2009-08-07 16:54

History

#1 Updated by Michael Stucki about 10 years ago

bug_11663_part1.diff contains no changes at all, just comments and code cleanup.

#2 Updated by Michael Stucki about 10 years ago

bug_11663_part2.diff makes sure that an error is displayed if there is a cHash error and disableNoCacheParameter is enabled. This is required since pages that are cached depend on a correct cHash.

#3 Updated by Michael Stucki about 10 years ago

bug_11663_part3.diff skips a condition which seems useless anyway now that we use locking. Otherwise, again conflicts may occur if disableNoCacheParameter is enabled.

#4 Updated by Michael Stucki about 10 years ago

bug_11663_part4.diff finally contains a condition that sticks to enabling $TSFE->no_cache if one of the following conditions are met:
- either one of $TSFE->forceTemplateParsing || $TSFE-displayEditIcons || $TSFE->displayFieldEditIcons is enabled (Frontend editing)
- $TSFE-fePreview is enabled (Frontend preview)
- tslib_feTCE is loaded (again, related to frontend editing)
- tslib_AdminPanel is loaded (includes date simulation, group preview, frontend editing, etc.)

If there is anything missing in this list, please let me know.

#5 Updated by Michael Stucki about 10 years ago

Those 4 patches have not been tested by myself yet, but they should fix the issue completely.
A backport for TYPO3_4-2 will follow next...

#6 Updated by Michael Stucki about 10 years ago

For TYPO3 4.2, patches have been slightly modified:
- part1: Don't make code cleanups, just add the comments
- part2: Trunk version can (must!) be used
- part3: Instead of removing the whole condition, just skip it if disableNoCacheParameter is enabled. Eventually this may be a good solution for Trunk as well(?)
- part4: Instead of checking for tslib_AdminPanel, check for t3lib_tsfeBeUserAuth

#7 Updated by Georg Kühnberger about 10 years ago

+1
patches for 4.2 tested: the applied fine and solved the problem;
regards georg

#8 Updated by Alexander Opitz over 6 years ago

  • Status changed from Accepted to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

#9 Updated by Alexander Opitz about 6 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Michael Stucki)
  • Is Regression set to No

No feedback for over 90 days.

Also available in: Atom PDF