我尝试将Typo3安装从6.1升级到8.7 LTS,但我没有让模板正常工作。 到目前为止我做了什么:
旧安装使用了Fluid Pages Engine,但这不适用于8.7。据我所知,流体现在包含在错字3中了?
到目前为止,后端工作正在进行中。我可以管理用户,页面和我看到的一切。但是,当我打电话给前端时,我得到一个例外:#1294587217: The page is not configured! [type=0][]. This means that there is no TypoScript object of type PAGE with typeNum=0 configured.
TYPO3\CMS\Core\Error\Http\ServiceUnavailableException thrown in file
...\typo3_src-8.7.10\typo3\sysext\frontend\Classes\Controller\TypoScriptFrontendController.php in line 2487.
我尝试了wikipage中的解决方案并替换了" setup" -Template信息
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/typoscript/domain.ts">
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/typoscript/typoscript.ts">
page.stdWrap.parseFunc.short.i3 = <span style="text-transform:normal;">i3</span>
带
# Default PAGE object:
page = PAGE
# Define output for typeNum=0, the default type.
page.typeNum = 0
page.10 = TEXT
page.10.value = HELLO WORLD!
然后我看到&#34; HELLO WORLD!&#34;。现在我卡住了:我需要做些什么才能让#34;正常&#34;模板工作?
提前致谢
答案 0 :(得分:4)
TYPO3 7和8都包含FLUIDTEMPLATE Typoscript对象,但EXT:fluidpages是由fluidtypo3.org团队保留的外部扩展。
正如你所写:
# Default PAGE object:
page = PAGE
# Define output for typeNum=0, the default type.
page.typeNum = 0
page.10 = TEXT
page.10.value = HELLO WORLD!
您正在定义PAGE对象将仅包含该simpe TEXT对象。
使用FLUIDTEMPLATE对象的“最小”配置是:
page = PAGE
page.typeNum = 0
page.10 = FLUIDTEMPLATE
page.10{
templateName = Default
layoutRootPaths {
0 = Path/To/Your/Layouts/
}
partialRootPaths {
0 = Path/To/Your/Partials/
}
templateRootPaths {
0 = Path/To/Your/Templates/
}
}
表示您使用的是Default.html模板
要使用不同的模板,您还应该配置一些后端布局;假设您使用数据库存储它们,之前的代码可能变为:
page = PAGE
page.typeNum = 0
page.10 = FLUIDTEMPLATE
page.10{
templateName= TEXT
templateName.stdWrap {
cObject = CASE
cObject {
key.data = levelfield:-2,backend_layout_next_level,slide
key.override.field = backend_layout
default = TEXT
default.value = Default
//these are the IDs of the backend_layout records in DB
1 = TEXT
1.value = Default
2 = TEXT
2.value = Home
//add other values
}
ifEmpty = Error
}
layoutRootPaths {
0 = Path/To/Your/Layouts/
}
partialRootPaths {
0 = Path/To/Your/Partials/
}
templateRootPaths {
0 = Path/To/Your/Templates/
}
}
另请参阅:https://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Fluidtemplate/Index.html
如果您需要进一步的帮助,我建议您加入typo3 Slack频道(订阅此处:https://forger.typo3.com/slack)并加入 typo3-cms 频道和 fluidtypo3 频道。
答案 1 :(得分:1)
我认为您的typoscript文件未包含在typoscript.ts
。
首先复制setup.ts
文件中的所有typoscript并粘贴ROOT Template
中的ROOT template
并检查前端。如果一切都很好,那么USE <dbname>
肯定你的typoscript不包括在内,如果这不起作用,那么你的typoscript对象就会出现一些错误