Project

General

Profile

T3 V10 Best Practice » History » Version 16

Enis Nuredini, 01.02.2024 09:40

1 13 Carsten Rose
{{toc}}
2
3 1 Enis Nuredini
h1. T3 V10 Best Practice
4
5
h2. Redirect BaseUrl to Home
6
7
Site Management > Redirects > Add redirect
8
Source Domain = webwork20a.math.uzh.ch
9
Source Path = /medtool/dev10/
10
Force SSL Redirect = Enabled
11
Status Code HTTP Header = 307
12
13
h2. Forwarding (Page not Found/Not accessible)
14
15
Typo3 Site Configuration:
16 2 Enis Nuredini
17 1 Enis Nuredini
Site Management > Sites > Error Handling > [errorCode] = 403 / [errorHandler] = Page / [errorContentSource] = https://webwork20a.math.uzh.ch/medtool/dev10/login
18 3 Enis Nuredini
Specific page must be given. Using BaseUrl doesnt work.
19 4 Enis Nuredini
20
h2. PDF emptyTemplate
21
22
The empty template setup content from T3 V9 and earlier doesn't work in 10 and higher anymore. Instead following setup can be used:
23
<pre>
24
page = PAGE
25
page.typeNum = 0
26
page.includeCSS {
27
  10 = typo3conf/ext/qfq/Resources/Public/Css/qfq-letter.css
28
}
29
30
// Grant access to any logged in user or specific development IPs
31
[loginUser('*') or ip('127.0.0.1')] 
32
  page.10 < styles.content.get
33
[else]
34
  page.10 = TEXT
35
  page.10.value = access forbidden
36
[global]
37
</pre>
38 5 Enis Nuredini
Attention: Its possible that the filename font-awesome.min.css from the UZH-CD Extension makes problems with wkhtmltopdf. The file should be copied with the new name fontawesome.min.css. This resolved the problem.
39 6 Philipp Gröbelbauer
40
41
h2. cHash Error
42
43
Folgender Fehler könnte auftreten beim Öffnen eines SIP-Links:
44
45
!clipboard-202303091449-ohd1d.png!
46
47
Dieser Fehler kann umgangen werden:
48
49
# T3 Backend öffnen -> (Admin Tools) -> Settings
50
# Configure Installation-Wide Options
51
# [FE][pageNotFoundOnCHashError] = false setzen
52
53
!clipboard-202303091452-jnif4.png!
54
55
Ob das die beste Lösung ist, bleibt unklar.
56 7 Enis Nuredini
57
h2. Frontend Cache-Control
58
59 16 Enis Nuredini
Wenn ein User im Backend eingeloggt ist, dann werden im Frontend alle Seiten ohne die "no-store" Option geladen. Das führt dazu dass das Page-Load Verhalten der QFQ-Records nicht dem erwarteten entsprechen. Als Beispiel beim Form-Editor: Wird ein neues Form-Element erstellt und danach über Close zurück zum Form-Editor geleitet, so wird das neue Form-Element nicht angezeigt, sondern erst nach einem Page-Reload. Die "no-store" Option wird jedoch immer geladen wenn man selbst nicht im Backend eingeloggt ist.
60 7 Enis Nuredini
61 1 Enis Nuredini
h3. Apache
62 10 Enis Nuredini
63
Durch den folgenden Eintrag in das .htaccess File der Webseite kann der "no-store" trotz eingeloggtem Backend erzwungen werden:
64 9 Enis Nuredini
65 7 Enis Nuredini
<pre>
66 16 Enis Nuredini
<IfModule mod_headers.c>
67 7 Enis Nuredini
 Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
68 16 Enis Nuredini
</IfModule>
69 7 Enis Nuredini
</pre>
70 11 Enis Nuredini
71
h3. Nginx
72
73
Ein Eintrag ins default.conf (wenn Ordner "sites-available" existiert), ansonsten ins nginx.conf:
74
75
<pre>
76
add_header Cache-Control "no-store";
77
</pre>
78 12 Enis Nuredini
79
Bei Verwendung vom Docker nicht vergessen Docker neu zu starten.
80 14 Enis Nuredini
81 15 Enis Nuredini
h2. Dev Setup
82 14 Enis Nuredini
83
Folgender Eintrag ins Setup vom Typo3 Root Template verwendet die debug Version des QFQ JS Files:
84
<pre>
85
page.includeJS.24 = typo3conf/ext/qfq/Resources/Public/JavaScript/qfq.debug.js
86
plugin.tx_felogin_login {
87
88
		view {
89
90
		templateRootPaths {
91
92
	10 = fileadmin/templates/Felogin/
93
94
		}
95
	}
96
}
97
</pre>