【问题标题】:TYPO3 Upgrade ( 7.6 to 10): Site Configuration not foundTYPO3 升级(7.6 到 10):未找到站点配置
【发布时间】:2020-07-14 23:22:12
【问题描述】:

我花了一天的时间尝试将我的 TYPO3 安装从 7.6 版升级到 10.4 版,但在一切顺利之间遇到了一些困难,以至于我可以登录到后端等等。

我现在面临几个小时的问题是我无法让前端工作。

我收到以下错误:

找不到页面。 该页面不存在或无法访问。原因:未找到站点配置

我已经在谷歌上滚动了很长时间,但我现在似乎找不到合适的解决方案。

我采用的方法是使用 composer 安装 T3-10 并迁移数据库并运行升级向导。我还检查了后端中的“站点配置”以及文件系统中的站点配置部分,一切似乎都很好。

base: 'https://mydomain.local/'
baseVariants: {},
errorHandling: {},
languages: 
  - 
    title: Deutsch
    enabled: true
    languageId: '0'
    base: /
    typo3Language: de
    locale: de_DE
    iso-639-1: de
    navigationTitle: German
    hreflang: de_DE
    direction: ltr
    flag: de
    websiteTitle: ''
rootPageId: 1
routes: ''
websiteTitle: XYZ

我确定这只是我现在似乎找不到的小东西,还有其他人经历过这个吗?

【问题讨论】:

  • 您是否按版本升级安装版本(7.6 > 8.7 > 9.5 > 10.4)并为每个版本运行升级向导?
  • 不,我只是直接从 7.6 安装到 10.4,后端工作正常,只是前端不工作
  • 您还有域记录吗? AFAIK 存在旧域记录干扰站点配置的情况
  • 是否只有 1 个站点配置为 rootPageId: 1
  • @JonasEberle 是的,只有 1 个 PID 为 1 的站点配置我正在使用 vhost-adress xyz.local 的 localhost 环境工作,当我查看站点配置和后端时,一切似乎都很好.我在哪里可以找到旧的域记录?

标签: typo3 typo3-10.x


【解决方案1】:

在代理后面安装 TYPO3 时遇到问题。在全局配置中设置以下值解决了我的问题。 (可以通过 Admin ToolsSettingsConfigure Installation Wide Options 中的后端完成,或者直接在 LocalConfiguration.php 文件中完成)

'HTTP' => [
   'proxy' => '<yourProxyIp:yourProxyPort>',
],
'SYS' => [
    'reverseProxyHeaderMultiValue' => 'last',
    'reverseProxyIP' => '<yourReverseProxyIp>',
    'reverseProxySSL' => '*'
]

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,因为我在站点 conf 中写了一个 http:// url。 使用 https:// 以及没有 SSL 证书,一切都很好。

    【讨论】:

      【解决方案3】:

      您是否在 TypoScript 设置/常量中使用旧条件?从 TYPO3 10 开始,您需要使用 Symfony 表达式语言。看看这里并在需要的地方替换代码中的那些。

      [page["uid"] in 18..45]
      # This condition matches if current page uid is between 18 and 45
      # Not possible with old syntax
      [END]
      
      [34 in tree.rootLineIds || 36 in tree.rootLineIds]
      # This condition matches, if the page viewed is or is a subpage to page 34 or page 36
      # Old Syntax: [PIDinRootline = 34,36]
      [END]
      
      [loginUser('*')]
      # Old syntax: [loginUser = *]
      [END]
      
      [page["field"] == "value"]
      # Old syntax: [page|field = value]
      [END]
      
      [loginUser('*') == false]
      # Old syntax: [loginUser = ]
      [END]
      
      [getTSFE().id >= 10]
      # Old Syntax [globalVar = TSFE:id >= 10]
      [END]
      
      [applicationContext == "Production" && userId == 15]
      # This condition match if application context is "Production" AND logged in user has the uid 15
      # Old syntax: [applicationContext = "Production"] && [loginUser = 15]
      [END]
      
      [request.getNormalizedParams().getHttpHost() == 'typo3.org']
      # This condition matches if current hostname is typo3.org
      # Old Syntax: [globalString = IENV:HTTP_HOST = www.typo3.org]
      [END]
      
      [like(request.getNormalizedParams().getHttpHost(), "*.devbox.local")]
      # This condition matches if current hostname is any subdomain of devbox.local
      # Old Syntax: [globalString = IENV:HTTP_HOST = *.devbox.local]
      [END]
      
      [page["uid"] in [1,2,3,4] || 5 in tree.rootLineIds]
      # This condition matches if current page uid is either 1,2,3 or 4
      # or if the current page is 5 or any subpage of 5
      [END]
      
      [backend.user.isLoggedIn]
      # This condition matches if a backend user is logged in
      # Old syntax: [globalVar = TSFE:beUserLogin = 1]
      [END]
      
      [traverse(request.getQueryParams(), 'tx_blog_tag/tag') > 0]
      # This condition matches if current query parameters have tx_blog_tag[tag] set to a value greater than zero
      [END]
      

      来源:https://usetypo3.com/symfony-expression-language-in-typo3.html

      【讨论】:

        【解决方案4】:

        在将项目 (10.4.14) 从本地开发人员部署到舞台环境时,我遇到了同样的问题。

        由于缺少 SSL 证书,Apache 2.4 中的配置。指向丢失的证书文件。 修复此问题后,找到了站点配置。

        【讨论】:

          猜你喜欢
          • 2019-05-12
          • 2018-05-15
          • 2016-08-14
          • 2017-09-12
          • 2018-12-15
          • 1970-01-01
          • 2019-12-13
          • 2021-02-08
          • 2015-02-13
          相关资源
          最近更新 更多