0% found this document useful (0 votes)
38 views11 pages

TYPO3 Frontend Rendering Process v1.5

1. The document outlines the TYPO3 front end rendering process, which includes initializing constants and libraries, checking requirements, initializing database and template objects, retrieving page content from the cache, generating the final page, and including additional scripts and panels. 2. Key steps include determining the page ID, validating caches, retrieving compressed template configuration, setting user and language settings, processing submissions and outputs, and saving session and usage data. 3. Errors may occur if PHP version is insufficient, extensions are missing, or the database connection or cache files fail.

Uploaded by

jacori
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views11 pages

TYPO3 Frontend Rendering Process v1.5

1. The document outlines the TYPO3 front end rendering process, which includes initializing constants and libraries, checking requirements, initializing database and template objects, retrieving page content from the cache, generating the final page, and including additional scripts and panels. 2. Key steps include determining the page ID, validating caches, retrieving compressed template configuration, setting user and language settings, processing submissions and outputs, and saving session and usage data. 3. Errors may occur if PHP version is insufficient, extensions are missing, or the database connection or cache files fail.

Uploaded by

jacori
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

1 2

define path constants define constants

no success / end with error

3
init time tracking

4
include mandatory libraries

5
include configuration

no success / end with error

6
init db-wrapper object

7
check environment

insufficient PHP version / end with error

8
check extension ID (eID)

9
include FE libraries

10
init FE-object ($TSFE)
tslib_fe-PostProc

11
open DB-connection connectToDB

no success / end with error

Legend
GLOBAL
12 keyword preview (index.php)
re-init FE-object ($TSFE)
GLOBAL
(typo3/sysext /cms/tslib/index_ts.php)
13
ADMCMD_preview
tslib_fe / $TSFE
(typo3/sysext /cms/tslib/class.tslib_fe.php)
14 RDCT set / Redirect URL
send redirect = Hook

connect 2

TYPO3 Front End Rendering Process Page 1/11 Version 1.5


connect 2

15 compression level set


start output buffering

16
Initialise object
init FE-user

preBeUser
BE user cookie exists
17
init „logged in“ BE-user

draft preview
18
init BE-user for preview

workspace preview mode


19
init workspace preview

20
check alternative ID methods checkAlternativeIdMethods -PostProc

21
determine page ID

22
validate cache hash

page cHash mismatch / end with error

23
get compressed TCA

24
initialise object
init template

25
get page from cache
Legend
headerNoCache
GLOBAL
26 (typo3/sysext /cms/tslib/index_ts.php)
get config array
tslib_fe / $TSFE
(typo3/sysext /cms/tslib/class.tslib_fe.php)

27 tslib_feUserAuth / $TSFE->fe_user
convert POST charset extends t3lib_userAuth
(typo3/sysext /cms/tslib/class.tslib_feuserauth.php)

28 t3lib_TStemplate / $TSFE->tmpl
setting language and locale (t3lib/class.t3lib_tstemplate.php)

= hook

connect 3

TYPO3 Front End Rendering Process Page 2/11 Version 1.5


connect 3

29
set jump URL

30
check data submission checkDataSubmission

no cached record found for this page sendFormmail-PreProcClass

31
generate the page
non chached objects
32
include non-cached objects

isOutputting

process page output

contentPostProc-output

external scripts
include external scripts

35
page outputting

36
$TSFE: store session data

37
save hit statistics
sys_stat-PreProcClass

jump URL set


38
check jump URL

preview mode
39 Legend
show preview info
tslib_fe / $TSFE
(typo3/sysext/cms/tslib/class .tslib_fe.php)

hook_eofe tslib_feUserAuth / $TSFE->fe_user


admin panel enabled extends t 3lib_userAuth
40 (typo3/sysext/cms/tslib/class .tslib_feuserauth.php)
$TSFE: generate admin panel
t3lib_tsfeBeUserAuth / $BE_USER
extends t3lib_beUserAuth
extends t3lib_userAuthGroup
extends t3lib_userAuth
(t3lib/class .t3lib_tsfebeuserauth.php)
41 compression level set
compress output
= hook

TYPO3 Front End Rendering Process Page 3/11 Version 1.5


16
init FE-user

16.1
Initialise object
init FE-user object

16.2
start user session postUserLookUp

16.3
unpack uc

Legend
16.4
fetch session data tslib_fe / $TSFE
(typo3/sysext/cms/tslib/class.tslib_fe.php)

initFEuser tslib_feUserAuth / $TSFE->fe_user


extends t3lib_userAuth
(typo3/sysext/cms/tslib/class.tslib_feuserauth.php)
16.5
update „isOnline“ timestamp
= hook

TYPO3 Front End Rendering Process Page 4/11 Version 1.5


17
init BE-User

17.1
Initialise object
init BE user object

17.2
postUserLookUp
start user session

17.3
unpack uc

17.4
fetch group data

fetchGroupQuery

17.5 login validation failed fetchGroups_postProcessing


unset BE user initialisation

17.6
init admin panel usage

admin panel enabled

17.7
save admin panel changes

17.8
extEditAction load FE editing classes

Legend
GLOBAL
(typo3/sysext /cms/tslib/index_ts.php)

t3lib_tsfeBeUserAuth / $BE_USER
extends t3lib_beUserAuth
extends t3lib_userAuthGroup
extends t3lib_userAuth
(t3lib/class.t3lib_tsfebeuserauth.php)

= Hook

TYPO3 Front End Rendering Process Page 5/11 Version 1.5


21
dertermine page ID

21.1
set ID from ArgV

backend user logged in


21.2
get preview settings

page id existing 21.3


check if page is hidden

is live workspace
21.4 21.5
check root line set preview flag

21.6
Check access
fetch the page ID

21.7
init user groups

21.8
fetch ID domain

page not found / end with error

21.9
fetch ID rootline

Legend
page not found / end with error
tslib_fe / $TSFE
(typo3/sysext/cms/tslib/class.tslib_fe.php)

21.10 t3lib_tsfeBeUserAuth / $BE_USER


check BE user access extends t3lib_beUserAuth
extends t3lib_userAuthGroup
extends t3lib_userAuth
no read access to page (t3lib/class .t3lib_tsfebeuserauth.php)
21.11
clear preview
t3lib_pageSelect / $TSFE->sys_page
(t3lib/class .t3lib_page.php)

21.12
check login allowed in branch = Hook

no login allowed in branch

determineId-PostProc

TYPO3 Front End Rendering Process Page 6/11 Version 1.5


31
generate the page

31.1
generate page pre processing

31.2
determine which script

use custom script

31.3
init pagegeneration

31.4
include files
31.7
custom external script
31.5
render content

31.6
setting header

31.8 31.9
generate page post processing store page in cache
contentPostProc-all

contentPostProc-cached

pageIndexing

insertPageIncache

Legend
tslib_fe / $TSFE
(typo3/sysext/cms/tslib/class.tslib_fe.php)

TSpagegen
(sysext/cms/tslib/class.tslib_pagegen.php,
sysext/cms/tslib/pagegen.php)

external script for page generation

= Hook

TYPO3 Front End Rendering Process Page 7/11 Version 1.5


1. Frontend Rendering Process (TYPO3 4.1)

No Action Title Filename Function Description


1 define path constants index.php -Path constants for this site and tslib
- include index_ts.php
2 define constants index_ts.php TYPO3_OS, TYPO3_MODE
- various path constants if not already set
3 init time tracking index_ts.php new t3lib_timeTrack init time tracking object ($TT)
4 include mandatory libraries index_ts.php class.t3lib_div.php, class.t3lib_extmgm.php
5 include configuration index_ts.php config_default.php, class.t3lib_db.php
generated from localconf.php and
ext_localconf.php
6 init db-wrapper object index_ts.php t3lib_div::makeInstance init db wrapper object ($TYPO3_DB)
('t3lib_DB')
7 check environment index_ts.php - php version, $GLOBALS
- Add slashes to GET/POST arrays
8 check extension ID (eID) index_ts.php look for extension id to launch alternative
output engine
9 include FE libraries index_ts.php tslib_fe.php;
t3lib_page.php;
3lib_userauth.php;
class.tslib_feuserauth.php;
t3lib_tstemplate.php;
t3lib_cs.php;
10 init FE object index_ts.php t3lib_div::makeInstance init TypoScript front end object ($TSFE)
ClassName('tslib_fe')
tslib_fe-PostProc class.tslib_fe.php tslib_fe() Hook

11 open db connection class.tslib_fe.php connectToDB() Open database connection


connectToDB class.tslib_fe.php connectToDB() Hook

12 re-init FE-object index_ts.php keyword authenticated preview genereates a


temporary preview URL which is accessible
without BE login (overrides existing
authentication)
13 ADMCMD_preview class.tslib_fe.php ADMCMD_preview_postIni - unsets BE user cookie
t() - force BE user settings according preview
configuration
14 send redirect class.tslib_fe.php sendRedirect() Redirect to a different page (location)
15 start output buffering index_ts.php ob_start() Data will not be sent to screen until output
buffering ends
16 init FE user class.tslib_fe.php See separate diagram Init the frontend user object ($TSFE>fe_user)
preBeUser index_ts.php Hook

17 init BE user index_ts.php See separate diagram Init the backend user object ($BE_USER)
18 init BE user for preview index_ts.php Init a “dummy” backend user for preview only
19 init workspace preview class.tslib_fe.php workspacePreviewInit() Init workspace preview functions
20 check alternative page ID class.tslib_fe.php checkAlternativeIdMethods Resolve alternative request URL such as
() “simulate static documents” or “Real URL”
checkAlternativeIdMethods- class.tslib_fe.php checkAlternativeIdMethods Hook
PostProc
21 determine page ID class.tslib_fe.php See separate diagram class.tslib_fe.php Determine the page id
22 validate cache hash class.tslib_fe.php makeCacheHash() Create the hash string based on additional
parameters in the URL if
get parameter cHash is set
23 get compressed TCA class.tslib_fe.php getCompressedTCarray() getting a compressed version of the TCA for
the frontend editing
24 init template class.tslib_fe.php initTemplate() Init the TypoScript template parser
> t3lib/class.t3lib_tstemplate.php
25 get page from cache class.tslib_fe.php getFromCache() Query the cache tablesfor the requested
page
headerNoCache class.tslib_fe.php headerNoCache() Hook

26 get config array class.tslib_fe.php getConfigArray() Getting the TypoScript config array if not yet
existing
27 convert POST charset class.tslib_fe.php convPOSTCharset() Convert POST data to internal
"renderCharset" if different from the
metaCharset:
28 setting language and class.tslib_fe.php settingLanguage() Setting the internal var,
locale settingLocale() sys_language_uid + locale settings
29 set jump URL class.tslib_fe.php setExternalJumpUrl() - set the jump URL for page type "External
checkJumpUrlReferer() URL"
- Checks the jumpurl referer if required
Jumpurl is a concept where external links are
redirected from the index_ts.php script.
30 check data submission class.tslib_fe.php checkDataSubmission() Process form input data

TYPO3 Front End Rendering Process Page 8/11 Version 1.5


No Action Title Filename Function Description
checkDataSubmission class.tslib_fe.php checkDataSubmission() Hook

sendFormmail- class.tslib_fe.php sendFormmail() Hook


PreProcClass
31 generate the page class.tslib_fe.php See separate diagram
32 include non-cached objects class.tslib_fe.php INTincScript() Uncached user functions (USER_INT), php
or java scripts
isOutputting class.tslib_fe.php isOutputting() Hook

33 process page output class.tslib_fe.php processOutput() process the page before output
contentPostProc-output class.tslib_fe.php processOutput() Hook

34 include external scripts class.tslib_fe.php Include external php scripts


35 page outputting index_ts.php Echo $content Generate output
36 $TSFE: store session data class.tslib_fe.php storeSessionData() Store session data for FE user
>class.tslib_feuserauth.php
37 save hit statistics class.tslib_fe.php statistics() Save hit statistics for page
sys_stat-PreProcClass class.tslib_fe.php Statistics() Hook

38 check Jump URL class.tslib_fe.php jumpurl() Sends a header 'Location' to jumpurl, if


jumpurl is set
39 show preview info class.tslib_fe.php previewInfo() Generate red preview information box
hook_eofe index_ts.php Hook

40 $TSFE:generate admin class.t3lib_tsfebeu extPrintFeAdminDialog() Generate admin panel options if applicable


panel serauth.php
41 compress output class.tslib_fe.php gzip_encode() Compress output if compression level set

TYPO3 Front End Rendering Process Page 9/11 Version 1.5


2. Initialise Frontend User
No Action Title Filename Function Description
16.1 init FE user object class.tslib_feuserauth $TSFE>initFEuser() Init object $TSFE>fe_user
16.2 start user session class.t3lib_userauth.php Start() - check and set login security level
(normal, challenged, superchallenged)
- check if a password/username was sent
and if so, try to authenticate the user
- Lookup a session attached to a user and
check timeout etc.
- Garbage collection, setting of no-cache
headers.
postUserLookUp class.t3lib_userauth.php start() Hook

16.3 unpack uc class.t3lib_userauth.php unpack_uc() Unpack user configuration. Contains


various user specific settings for page.
(e.g state of pagetree, adminpanel)
16.4 fetch session data class.tslib_feuserauth fetchSessionData() - Fetches the session data for the user
(from the fe_session_data table) based on
the ->id of the current user-session
- delete old session data (older than 24
hrs).
initFEuser class.tslib_fe.php initFEuser() Hook

16.5 update “is online” class.tslib_fe.php initFEuser() Update timestamp every 60 seconds
timestamp

3. Initialise Backend User


No Action Title Filename Function Description
17.1 init BE user index_ts.php makeInstance Init object SBE_user
class.t3lib_tsfebeuserauth. ('t3lib_tsfeBeUserAuth')
php
17.2 start user session class.t3lib_userauth.php Start() - check and set login security level
(normal, challenged, superchallenged)
- check if a password/username was sent
and if so, try to authenticate the user
- Lookup a session attached to a user and
check timeout etc.
- Garbage collection, setting of no-cache
headers.
postUserLookUp class.t3lib_userauth.php start() Hook

17.3 unpack uc class.t3lib_userauth.php unpack_uc() Unpack user configuration


17.4 fetch group data class.tslib_feuserauth fetchGroupData() - fetch FE groups which the current FE
user is member of
- accumulate user and group TS config
fetchGroupQuery class.t3lib_userauthgroup. fetchGroups() Hook
php
fetchGroups_post class.t3lib_userauthgroup. fetchGroups() Hook
Processing php
17.5 unset BE user index_ts.php Unset BE user initialisation if login
initialisation validation failed
- check lock to ip
- check backend access settings
17.6 init admin panel class.t3lib_tsfebeuserauth. extInitFeAdmin()
usage php
17.7 save admin panel class.t3lib_tsfebeuserauth. extSaveFeAdminConfig() Save any changes in admin panel settings
changes php
17.8 load FE editing index_ts.php class.t3lib_tcemain.php,
classes class.t3lib_tceforms.php,
class.t3lib_iconworks.php,
class.t3lib_loaddbgroup.php,
class.t3lib_transferdata.php
extEditAction class.t3lib_tsfebeuserauth. extEditAction()
php

TYPO3 Front End Rendering Process Page 10/11 Version 1.5


4. Determine Page ID
No Action Title Filename Function Description
21.1 set ID from ArgV class.tslib_fe.php setIDfromArgV()s This checks if there are ArgV-parameters in
the QUERY_STRING and if so, those are
used for the id
21.2 get BE user class.tslib_fe.php If there is a Backend login check for any
preview settings preview settings:
21.3 check if page is class.tslib_fe.php Now it's investigated if the raw page-id points
hidden to a hidden page and if so, the flag is set.
21.4 check root line class.tslib_fe.php makeInstance For Live workspace: Check root line for
('t3lib_pageSelect') proper connection to tree root (done because
Init() of possible preview of page / branch
versions)
21.5 set preview flag class.tslib_fe.php - The preview flag will be set if a backend
user is in an offline workspace
-If the front-end is showing a preview,
caching MUST be disabled.
21.6 fetch the page ID class.tslib_fe.php fetch_the_id() - This gets the id of the page, checks if the
page is in the domain and if the page is
accessible
- init pageSelect object, preview settings
21.7 init user groups class.tslib_fe.php initUserGroups() - init user groups
setSysPageWhereClause() - extract id from URL
21.8 fetch ID domain class.tslib_fe.php findDomainRecord() - check the first visible page of the current
getFirstWebPage() domain
21.9 fetch ID rootline class.tslib_fe.php getPageAndRootlineWithD - get page and rootline arrays
omain() - if page is not accessible, fetch previous
page in rootline
- if page type is shortcut, fetch rootline of
shortcut target page
21.10 check be user t3lib_userauthgroup.php doesUserHaveAccess() Check if backend user has read access to
access this page. If not, recalculate the id.
21.11 clear preview class.tslib_fe.php
21.12 check login allowed class.tslib_fe.php checkIfLoginAllowedInBran Checks if user logins are blocked for a certain
in branch ch() branch and if so, will unset user login and re-
fetch ID
determineId-
PostProc

5. Generate Page
No Action Title Filename Function Description
31.1 generate page pre class.tslib_fe.php generatePage_preProcessi store temporary temporary user message in
processing ng() cache table. ( Page is being generated..)
31.2 determine which class.tslib_fe.php generatePage_whichScript Determines to include custom or
script () pagegen.php script.
Returns script-filename if a TypoScript
(config) script is defined and should be
include instead of pagegen.php
31.3 init pagegen class.tslib_pagegen.php pagegenInit() Setting some vars in TSFE, primarily based
on TypoScript config settings.
31.4 include files class.tslib_pagegen.php getIncFiles() Returns an array with files to include. These
files are the ones set up in TypoScript config.
31.5 render content class.tslib_pagegen.php renderContent() Rendering the page content
31.6 setting header class.tslib_pagegen.php TSpagegen::renderContent rendering normal HTML-page with header by
WithHeader wrapping the generated content
($pageContent) in body-tags and setting the
header accordingly.
31.7 custom external class.tslib_fe.php Generate from custom external script
script
31.8 generate page post class.tslib_fe.php generatePage_postProces caching and indexing the page
processing sing()
contentPostProc-all class.tslib_fe.php generatePage_postProces Hook
sing()
contentPostProc- class.tslib_fe.php generatePage_postProces Hook
cached sing()
pageIndexing class.tslib_fe.php generatePage_postProces Hook
sing()
insertPageIncache class.tslib_fe.php realPageCacheContent() Hook

31.9 store page in cache realPageCacheContent()

TYPO3 Front End Rendering Process Page 11/11 Version 1.5

You might also like