Skip to content

fix: make TYPO3 nginx config work with TYPO3 v12, fixes #7299, for #7230#7301

Merged
rfay merged 3 commits into
ddev:mainfrom
stasadev:20250513_stasadev_typo3_nginx
May 19, 2025
Merged

fix: make TYPO3 nginx config work with TYPO3 v12, fixes #7299, for #7230#7301
rfay merged 3 commits into
ddev:mainfrom
stasadev:20250513_stasadev_typo3_nginx

Conversation

@stasadev

@stasadev stasadev commented May 15, 2025

Copy link
Copy Markdown
Member

The Issue

Culprit:

How This PR Solves The Issue

Uses a different nginx technique. Spent long hours with ChatGPT.

Manual Testing Instructions

Try TYPO3 quickstart for v11, v12, v13, v14 (full install with login)

https://ddev.readthedocs.io/en/stable/users/quickstart/#typo3

v14:

git clone git@github.com:TYPO3/TYPO3.CMS.BaseDistribution.git my-typo3-site14
cd my-typo3-site14
ddev config --project-type=typo3 --docroot=public --php-version=8.3
ddev composer install
ddev config --auto # create TYPO3 settings after TYPO3 classes are installed in vendor
ddev exec touch public/FIRST_INSTALL
ddev launch /typo3/install.php

v13:

PROJECT_NAME=my-typo3-site13
mkdir ${PROJECT_NAME} && cd ${PROJECT_NAME}
ddev config --project-type=typo3 --docroot=public --php-version=8.3
ddev start
ddev composer create-project "typo3/cms-base-distribution:^13"
ddev exec touch public/FIRST_INSTALL
ddev launch /typo3/install.php

v12:

PROJECT_NAME=my-typo3-site12
mkdir ${PROJECT_NAME} && cd ${PROJECT_NAME}
ddev config --project-type=typo3 --docroot=public --php-version=8.3
ddev start
ddev composer create-project "typo3/cms-base-distribution:^12"
ddev exec touch public/FIRST_INSTALL
ddev launch /typo3/install.php

v11:

PROJECT_NAME=my-typo3-site11
mkdir ${PROJECT_NAME} && cd ${PROJECT_NAME}
ddev config --project-type=typo3 --docroot=public --php-version=8.1
ddev start
ddev composer create-project "typo3/cms-base-distribution:^11"
ddev exec touch public/FIRST_INSTALL
ddev launch /typo3/install.php

Automated Testing Overview

Release/Deployment Notes

@rfay

rfay commented May 15, 2025

Copy link
Copy Markdown
Member

@mabolek would appreciate your review here as well, thanks!

@github-actions

github-actions Bot commented May 15, 2025

Copy link
Copy Markdown

Comment thread pkg/ddevapp/webserver_config_assets/nginx-site-typo3.conf Outdated
Comment thread pkg/ddevapp/webserver_config_assets/nginx-site-typo3.conf Outdated
@rpkoller

Copy link
Copy Markdown
Collaborator

i havent seen your PR, randy only asked it would be good to have a quickstart for v12. i'Ve created one #7302 adding tabs for v13 and v12 plus bats test for each. i then ran into a failing test for the login on v12 ^^, a good proof that it works. i then downloaded the artifact from this PR and with that the tests passed. i just realized you are adding tests for v12 in this PR as well. i wonder would it make sense to drop the test from this one and use the test from the other. for one the creation for the first install file is only necessary for installs in the web ui for install using typo3 setup it is not necessary plus i did a one or two more asserts. you may take a look. or we might update the test in here? either way would be ok for me.

@rpkoller

Copy link
Copy Markdown
Collaborator

i've also tested the artifact with v11 there i run into a 500 error on ddev launch /typo3/install.php (i was using php 8.1 for that older version)

@stasadev

Copy link
Copy Markdown
Member Author

@rpkoller, let's keep your PR open.

I thought I was logged in and probably tested it on a version where it "worked".

But testing again today on a fresh head, I get a 500 error after login on TYPO3 v13.

@stasadev stasadev marked this pull request as draft May 16, 2025 09:47
@stasadev stasadev marked this pull request as ready for review May 16, 2025 12:03
@stasadev stasadev force-pushed the 20250513_stasadev_typo3_nginx branch from 9d0b9ee to f38f77f Compare May 16, 2025 12:11
@stasadev

Copy link
Copy Markdown
Member Author

@rpkoller, I think it's better to pull my PR first and then rebase yours.

(I looked at your PR, and I think we still need a quickstart without ddev typo3 setup, since that's the only way to manually check if TYPO3 automatic version detection that creates settings.php in DDEV works properly.)

I changed the nginx conditions, now it should work better.

@rpkoller

Copy link
Copy Markdown
Collaborator

the one thing i dont understand, @opi99 mentioned in the corresponding thread that your previous approach wouldnt work, but i wonder why it then worked for me when i tested locally? i downloaded the artifact and and ran the test from my own PR with it. they passed, after switching back to HEAD they failed again. would have my testes have to be extended?

and i am not sure why a quickstart for older versions would be necessary? those are only informal nothing is tested, they are only instructions for users how to setup a specific version? but i am fully on board to add another test, one without a quickstart like for typo3 v14?

@rfay

rfay commented May 16, 2025

Copy link
Copy Markdown
Member

I think the problem was that the login worked but nothing from there on. We can always hope to make more sophisticated quickstart tests...

@rfay

rfay commented May 16, 2025

Copy link
Copy Markdown
Member

I re-ran the quickstart tests as they failed on shopware6 of all things!

@stasadev

Copy link
Copy Markdown
Member Author

i wonder why it then worked for me when i tested locally?

I think the problem was that the login worked but nothing from there on.

Correct.

and i am not sure why a quickstart for older versions would be necessary?

@rpkoller, the reason why the previous change in #7230 worked for the current TYPO3 is because TYPO3 v13 already deprecated /typo/index.php and used a wrapper:

// Legacy wrapper for typo3/index.php
// @deprecated will be removed in TYPO3 v14, /index.php entrypoint should be used directly

I think it would not make any difference if I just replaced /typo3/index.php with /index.php at that time.

In case of TYPO3 v12, it uses a different approach in /typo3/index.php, so it doesn't work with DDEV v1.24.5.

And that's why we need to test TYPO3 v12.

@stasadev

Copy link
Copy Markdown
Member Author

I'm removing the TYPO3 v12 test from this PR. It'll be changed anyway in #7302, and I want to avoid PR conflicts.

@stasadev stasadev force-pushed the 20250513_stasadev_typo3_nginx branch from f38f77f to f9873e2 Compare May 16, 2025 16:41

@rfay rfay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

I tested in v11, v12, v13, v14, and also tested with alternate BE path /admin for v14. All worked great.

@stasadev stasadev changed the title fix: make TYPO3 nginx config work with TYPO3 v12, fixes #7299 fix: make TYPO3 nginx config work with TYPO3 v12, fixes #7299, for ##7230 May 16, 2025
@stasadev stasadev changed the title fix: make TYPO3 nginx config work with TYPO3 v12, fixes #7299, for ##7230 fix: make TYPO3 nginx config work with TYPO3 v12, fixes #7299, for #7230 May 16, 2025
@rfay rfay merged commit 276875f into ddev:main May 19, 2025
18 checks passed
@rfay rfay deleted the 20250513_stasadev_typo3_nginx branch May 19, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants