diff --git a/Configuration/TypoScript/Mixed/setup.typoscript b/Configuration/TypoScript/Mixed/setup.typoscript index 2ea1eeeb..a54d2033 100644 --- a/Configuration/TypoScript/Mixed/setup.typoscript +++ b/Configuration/TypoScript/Mixed/setup.typoscript @@ -4,7 +4,7 @@ plugin.tx_headless { staticTemplate = 1 } -[traverse(request.getHeaders(), 'accept')[0] == 'application/json'] +[request && traverse(request.getHeaders(), 'accept')[0] == 'application/json'] ## Include page @import "EXT:headless/Configuration/TypoScript/Page/*.typoscript" ## Include content elements @@ -13,7 +13,7 @@ plugin.tx_headless { @import "EXT:headless/Configuration/TypoScript/Configuration/*.typoscript" [END] -[traverse(request.getHeaders(), 'accept')[0] == 'application/json' && frontend.user.isLoggedIn] +[request && traverse(request.getHeaders(), 'accept')[0] == 'application/json' && frontend.user.isLoggedIn] initialData.10.fields.user.fields { logged = BOOL logged.value = 1