【问题标题】:TYPO3 setup issue with Composer + Distribution Package + helhum/typo3-secure-webComposer + Distribution Package + helhum/typo3-secure-web 的 TYPO3 设置问题
【发布时间】:2019-04-24 10:32:36
【问题描述】:

我们正面临分发包编写器的问题。我们的目标是实现 DDEV + Composer + Distribution Package + helhum/typo3-secure-web(感谢@helhum 提供如此出色的安全解决方案)。

问题/问题

当尝试访问后端时它不起作用,检查此屏幕截图https://i.imgur.com/lI5IGCE.png 无法访问 CSS/JS,似乎是某些目录结构(私有/公共)导致问题。

设置方法

第 1 步:创建项目的文件夹

mkdir my-typo3-site
cd my-typo3-site

第 2 步:配置 PHP 版本

ddev config --project-type php --php-version 7.2

第 3 步:设置 TYPO3 最新版本

ddev composer create typo3/cms-base-distribution ^9 --no-interaction
ddev config --project-type typo3
ddev start

第 5 步:Composer.json,设置私人和公共文件夹

"extra": {
   "typo3/cms": {
       "root-dir": "private",
       "web-dir": "public"
   }
}

第 4 步:使用私有和公共文件夹结构保护您的 TYPO3

ddev composer require helhum/typo3-secure-web

第 5 步:创建 FIRST_INSTALL 文件

touch private/FIRST_INSTALL

第 6 步:TYPO3 安装向导(成功)

作曲家

由typo3/cms-base-distribution ^9生成的composer代码

{
    "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",
        "helhum/typo3-secure-web": "^0.2.8"
    },
    "scripts":{
        "typo3-cms-scripts": [
            "typo3cms install:fixfolderstructure",
            "typo3cms install:generatepackagestates"
        ],
        "post-autoload-dump": [
            "@typo3-cms-scripts"
        ]
    },
    "extra": {
        "typo3/cms": {
            "root-dir": "private",
            "web-dir": "public"
        }
    }
}

备注

ddev composer require typo3/minimal 一切正常:^9 它只会导致分发包出现问题。

分发包可能有什么问题?我会很感激你的反馈。非常感谢您的宝贵时间!

【问题讨论】:

  • 问题只是您的浏览器没有启用cookies吗?截图就是这么说的。我认为如果不启用 cookie,您将无法进行任何基于登录的活动...
  • 我已经交叉验证并且cookies已经启用。一个主要问题是,CSS/JS 路径似乎不起作用(私有和公共文件夹的映射问题)。可能与 helhum/typo3-secure-web 有冲突(因为它正在更改公共/私人文件夹)。

标签: docker composer-php typo3-9.x ddev


【解决方案1】:

Hurray,刚刚解决了这个问题!只需更改/遵循以下命令即可:

Step 1: Create a project's folder
Step 2: Configure PHP version
Step 3: Composer distribution package
Step 4: Create FIRST_INSTALL file
Step 5: TYPO3 Installation Wizard
Step 6: Composer.json, Setup private and public folders
Step 7: Secure your TYPO3 with folder structure private and public
Step 7: ddev composer require helhum/typo3-secure-web

万岁!再次感谢 @Helhum 提供如此安全的 TYPO3 解决方案 :)

InspirePeopleToSecure

干杯,

桑杰

【讨论】:

  • 所以关键是composer require helhum/typo3-secure-web 之后其他一切都设置好了...谢谢!
  • 是的,没错!我也和@Helhum谈过同样的事情:)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-17
  • 2018-02-19
  • 1970-01-01
相关资源
最近更新 更多