Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Install.rst - 'docroot' MUST be 'public' #190

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

People should know that they can't use a different value for 'docroot'. 
See also:
* TYPO3/get.typo3.org#291
* TYPO3/TYPO3.CMS.BaseDistribution#54
* ddev/ddev#3701
@mbrodala
Copy link
Member

Not sure what you mean, the web-dir is still allowed to be customized:

https://github.com/TYPO3/CmsComposerInstallers/blob/d9b4e06432a233809487cd2299df1d5bef02e079/README.md#web-dir

So no, the document root doesn't have to be public, it can be anything you like.

Personally I think public is inferior to web so I'll stick with the latter as long as possible.

@mbrodala mbrodala marked this pull request as draft March 22, 2022 17:18
@marble
Copy link
Member Author

marble commented Mar 22, 2022

Great, small PR, long story. Here it comes.

What this is about

Hi @mbrodala, so you are looking at the procedure we recommend and you think, you could simply say --docroot=web to get what you want? You're wrong. The problem is that you cannot achieve that with ddev composer create .... You can only achieve that with composer create-project ..., which requires ⓐ that you have Composer installed locally and ⓑ which is NOT what we are telling in our recipe. I fell into that trap.

Let's run this as a demo

It is exactly the procedure we recommend, just using port 8065 and 44365:

# https://example-project-directory.ddev.site:44365
mkdir example-project-directory
cd example-project-directory
ddev config  --project-type=typo3 --docroot=web --create-docroot \
    --http-port=8065 --https-port=44365
ddev start
ddev composer create "typo3/cms-base-distribution:^11"

The problem you get with ddev create ... --docroot != public

Container ddev-router Running TYPO3 does not seem to have been set up yet, missing LocalConfiguration.php (/home/marble/ddevprojects/example-project-directory/web/typo3conf/LocalConfiguration.php) Generating AdditionalConfiguration.php file for database connection. Unable to create settings file '/home/marble/ddevprojects/example-project-directory/web/typo3conf/LocalConfiguration.php': failed to write TYPO3 AdditionalConfiguration.php file: mkdir /home/marble/ddevprojects/example-project-directory/web/typo3conf: no such file or directory

What I think and what I tried

I really feel bad about the fact that this will most probably hit other developers that a new to TYPO3 and trust our recipe. Or that are new to the ddev composer method and want to give that a try. I now spent a lot of time to find out what's going on and what's going wrong, which is ok for me, as I want to know about TYPO3 stuff anyway. But we certainly cannot expect people coming from other CMSs will have that patience and understanding. The recipes we are providing should be robust. The one we are showing is fragile.

  1. Here Bug, if --docroot=public is set to some other value TYPO3/get.typo3.org#291 I tried to improve get.typo3.org. But my ticket got closed, nothing was changed and I was told there was no reason to use something else than "public".

  2. The problem could be fixed in DDEV. I tried that here: ddev create for TYPO3 fails if --docroot != public ddev/ddev#3701 But, the DRUD people are not willing to do something about it.

  3. Since I could not get through with my proposals I thought the least thing I could do is to add a small hint, that you can't change 'public' to something else in our recipe. That is what this PR is about. It's not ideal, but I don't know anything better and I'm exhausted about this by now.

  4. Personally I will follow Benni's recipe from Composer based install fails for DOCROOT != public  TYPO3/TYPO3.CMS.BaseDistribution#54 (comment) But that differs from our current recommendations even more and requires a local Composer installation, which ddev create ... would not.

What we should go for

I think what we really need

  1. is a DDEV Composer installation method that we agree on and that is robust
  2. It should be shown in all our examples, in the installation guide, at get.typo3.org and in the DDEV ReadTheDocs.
  3. It should be minimal, similarly to what we have.
  4. But we should have a page in our documentation explaining each step in a sentence or two.
  5. And we should place a link to that page near our minimal examples.

I'm not the right person to do all this. SomeBody™ else has to take care.

@mbrodala
Copy link
Member

Sorry, didn't see that this focuses on DDEV and I wasn't aware that there are artificial limitations in place here. In this case it should be fine.

You're wrong

BTW, I'd rather not use such wording. ;-)

@mbrodala mbrodala marked this pull request as ready for review March 24, 2022 07:39
@mbrodala mbrodala merged commit de2b98c into main Mar 24, 2022
@mbrodala mbrodala deleted the docroot-must-be-public branch March 24, 2022 07:40
linawolf pushed a commit that referenced this pull request Apr 7, 2022
People should know that they can't use a different value for 'docroot'.
See also:
* TYPO3/get.typo3.org#291
* TYPO3/TYPO3.CMS.BaseDistribution#54
* ddev/ddev#3701

(cherry picked from commit de2b98c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants