Project

General

Profile

Actions

Bug #54903

closed

TemplateService runs processIncludes twice when TypoScript is not in cache

Added by Peter Niederlag over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2014-01-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

TYPO3\CMS\Core\TypoScript\TemplateService

->processIncludes() is run "mandatory" from the stack ->start() ->runThroughTemplates() and doing all the work that needs to be done.

However if there is no entry in the caching framework for the parsed (transformed into array) TypoScript then ->processIncludes() is run a second time from within ->generateConfig(). The TypoScript does not change (exept one extra LF added into each Template with an <INCLUDE_TYPOSCRIPT instruction). There is no reason to call processIncludes() a second time.

How to check/reproduce

  • See the difference in lineNumbers in TypoScript-Object-Browser and Template-Analyzer in BE. You get 1 line offset per template that has an INCLUDE_TYPOSCRIPT instruction.
  • Put a debug statement inside of processIncludes() and check the frontend in cached / non-cached states and see that it is run twice after the cache has been cleared in BE. If you compare substr_count($value, LF); before and after checkIncludeLines() is called inside processIncludes() you will find: On first run INCLUDE_TYPOSCRIPT is executed and line numbers are different, which makes perfect sense. When the TS is not found in the cache and processIncludes() is executed the second time for some very weird reason line numbers are +1 if the template has an INCLUDE_TYPOSCRIPT (that was already processed). The TypoScript itself is exactly the same, except for this extra empty line, which won't be part of the hash-calculation and gone again on the next page-cycle (when the TS is found in cache).

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #54897: Wrong lineNumbers and templateNames in TypoScript-Object-Browser/Template-AnalyzerClosedPeter Niederlag2014-01-10

Actions
Actions #1

Updated by Gerrit Code Review over 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26748

Actions #2

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26748

Actions #3

Updated by Gerrit Code Review over 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26748

Actions #4

Updated by Gerrit Code Review over 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26748

Actions #5

Updated by Gerrit Code Review over 10 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26748

Actions #6

Updated by Gerrit Code Review about 10 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26748

Actions #7

Updated by Gerrit Code Review about 10 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26748

Actions #8

Updated by Gerrit Code Review about 10 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26748

Actions #9

Updated by Gerrit Code Review about 10 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26748

Actions #10

Updated by Gerrit Code Review about 10 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26748

Actions #11

Updated by Anonymous about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF