使用 Composer 更新 Typo3 9.5

问题描述 投票:0回答:1

我应该更新我的一位客户的typo3 v9.5 网站。在接触实时系统之前,我想通过演示站点进行一次演练。所以我建立了一个干净的 9.5 网站,运行以下内容:

composer create-project typo3/cms-base-distribution:^9.5 .

之后,我进行了typo3网络安装并让网站正常运行。我现在想要实现的是将网站更新到至少10.4。我首先运行了数据库分析器,它告诉我一切都很好,如下所示:

enter image description here

之后,我运行了升级向导。它告诉我它必须更改数据库排序规则(因为它是

utf_8_general_ci
)并且不需要其他任何东西:

enter image description here

之后我做了一个

composer update --with-dependencies
,这告诉我没有什么可以安装、更新或删除的。

这让我很困惑,因为系统从未提出重大更新。尝试了几件事后,我去更新

composer.json
文件本身,并将其替换为从干净的 10.4 版本生成的文件。

再次运行

composer update
后,更新成功了,但是数据库本身没有更新,并且因为缺少表而无法再登录。

糟糕,出现错误!使用参数 ["d07b003d9fce07cd551ada22027bf881", 1626341203] 执行 'SELECT content FROM cache_hash WHERE (identifier = ?) AND (expires >= ?)' 时发生异常:表 'complan4.cache_hash' 不存在

我显然没有正确更新网站,但我做错了什么? 我尝试遵循官方 typo3 文档。

composer.json
更新后:

{
    "repositories": [
        { "type": "composer", "url": "https://composer.typo3.org/" }
    ],
    "name": "typo3/cms-base-distribution",
    "description" : "TYPO3 CMS Base Distribution",
    "license": "GPL-2.0-or-later",
    "config": {
        "platform": {
            "php": "7.2"
        }
    },
    "require": {
        "helhum/typo3-console": "^6.0.0@beta",
        "typo3/cms-about": "^10.4",
        "typo3/cms-backend": "^10.4",
        "typo3/cms-belog": "^10.4",
        "typo3/cms-beuser": "^10.4",
        "typo3/cms-core": "^10.4",
        "typo3/cms-dashboard": "^10.4",
        "typo3/cms-extbase": "^10.4",
        "typo3/cms-extensionmanager": "^10.4",
        "typo3/cms-felogin": "^10.4",
        "typo3/cms-filelist": "^10.4",
        "typo3/cms-fluid": "^10.4",
        "typo3/cms-fluid-styled-content": "^10.4",
        "typo3/cms-form": "^10.4",
        "typo3/cms-frontend": "^10.4",
        "typo3/cms-impexp": "^10.4",
        "typo3/cms-info": "^10.4",
        "typo3/cms-install": "^10.4",
        "typo3/cms-recordlist": "^10.4",
        "typo3/cms-rte-ckeditor": "^10.4",
        "typo3/cms-seo": "^10.4",
        "typo3/cms-setup": "^10.4",
        "typo3/cms-sys-note": "^10.4",
        "typo3/cms-t3editor": "^10.4",
        "typo3/cms-tstemplate": "^10.4",
        "typo3/cms-viewpage": "^10.4"
        
    },
    "scripts":{
        "typo3-cms-scripts": [
            "typo3cms install:fixfolderstructure",
            "typo3cms install:generatepackagestates"
        ],
        "post-autoload-dump": [
            "@typo3-cms-scripts"
        ]
    }
}

composer.json
更新前:

{
    "repositories": [
        { "type": "composer", "url": "https://composer.typo3.org/" }
    ],
    "name": "typo3/cms-base-distribution",
    "description" : "TYPO3 CMS Base Distribution",
    "license": "GPL-2.0-or-later",
    "config": {
        "platform": {
            "php": "7.2"
        }
    },
    "require": {
        "helhum/typo3-console": "^5.5.5",
        "typo3/minimal": "^9.5",
        "typo3/cms-about": "^9.5",
        "typo3/cms-adminpanel": "^9.5",
        "typo3/cms-belog": "^9.5",
        "typo3/cms-beuser": "^9.5",
        "typo3/cms-felogin": "^9.5",
        "typo3/cms-fluid-styled-content": "^9.5",
        "typo3/cms-form": "^9.5",
        "typo3/cms-impexp": "^9.5",
        "typo3/cms-info": "^9.5",
        "typo3/cms-redirects": "^9.5",
        "typo3/cms-reports": "^9.5",
        "typo3/cms-rte-ckeditor": "^9.5",
        "typo3/cms-setup": "^9.5",
        "typo3/cms-seo": "^9.5",
        "typo3/cms-sys-note": "^9.5",
        "typo3/cms-t3editor": "^9.5",
        "typo3/cms-tstemplate": "^9.5",
        "typo3/cms-viewpage": "^9.5"
    },
    "scripts":{
        "typo3-cms-scripts": [
            "typo3cms install:fixfolderstructure",
            "typo3cms install:generatepackagestates"
        ],
        "post-autoload-dump": [
            "@typo3-cms-scripts"
        ]
    }
}
composer-php typo3 typo3-9.x typo3-extensions typo3-10.x
1个回答
0
投票

运行composer更新后,您将无法再登录完整后端,但您仍然可以登录包含必要的升级和维护模块的安装工具。

只需使用

https://your.domain.tld/typo3/install.php

并使用给定的安装工具密码登录,如果您刚刚进行了快速而肮脏的默认安装,则该密码应该与管理员密码相同。

然后您可以运行所有必要的数据库更新和升级向导。

如果您仍然遇到问题,您可能需要考虑预订专业的升级服务。

© www.soinside.com 2019 - 2024. All rights reserved.