Using the - composer create-project drupal-composer/drupal-project - script runs, but D8 install afterward fails.
The - composer create-project drupal-composer/drupal-project - script places the D8 files in non-standard locations.
In addition, the available documentation is incomplete and inadequate.
The available documentation:
https://www.drupal.org/docs/develop/using-composer/using-composer-to-man...
indicates that it places most (but not all)* the Drupal8 code files in a {installdirectory}/web/ sub-directory.
* it places the /vendor directory in {installdirectory}, with the rest of the D8 code in {installdirectory}/web/
- - very non-standard !!!!
Is the {installdirectory}/web/ D8 code placement meant to imply that the web server vhost should be directed to use {installdirectory}/web/ ?
If the just above is the case, it is not documented, and it doesn't work anyway.
Trying to run the install generates an error 500.
If the /web location is NOT meant to imply that the web server vhost should be directed to use {installdirectory}/web/ - then that seems impossible because that {installdirectory} directory does not contain any .php files or .htaccess that would implement loading from the {installdirectory} location. Of course trying to run the D8 install from {installdirectory} doesn't work.
Why write an "automatic" install script that does everything in non-standard ways?
Why not write an "automatic" install script that places all the code in the same locations that one would expect with a "normal" install created by downloading the code archive from drupal.org, or even by using composer to perform the D8 download/install with the:
composer require drupal/core ~8.2
command?
What is the point of an "automatic" install that requires its user to learn a non-standard file location pattern, with altered D8 code files, and with doesn't in fact work if installed anyway?
In summary, the - composer create-project drupal-composer/drupal-project - script just doesn't work, and seems sure to annoy rather than assist anyone working with Drupal8.
p.s. - this isn't my first D8 install. I have multiple D8 installs, performed by the following three methods:
- download of archive from drupal.org
- composer - using the require drupal/core method
- pre-setup from morethanthemes.com D8 theme/distribution products.
p.p.s - I'm not a noob, and have been working with Drupal for a decade, and my drupal.org account is over a decade old as evidence.
Comments
Comment #2
cilefen CreditAttribution: cilefen commentedPlease provide error logs. The pros and cons of each install type are pretty well documented here: https://www.drupal.org/docs/develop/using-composer/using-composer-to-man...
Forgive me, but the issue summary is a bit of a rant at the moment with open-ended rhetorical questions when we don't even know what is actually wrong here. There are lots of D8 composer-built sites in production. After trying composer and meeting some friction, it isn't helpful or appropriate to lash out at the free work others have done.
Consider rewording and shortening, and posting the composer.json.
Comment #3
sprite CreditAttribution: sprite as a volunteer commented1. the report above is not a "rant" as you describe it.
2. the bug report above is quite specific.
3. I will provide a link to a complete archive of the entire file/code base for download and analysis.
Most importantly, I am using the composer utility to maintain D8 sites installed by means other than the composer project script noted above.
The bug above isn't so much a "composer" bug, as it is a bug report regarding an ill conceived and poorly designed "automatic" script, regardless of authorship tool.
The "create-project drupal-composer/drupal-project" script just doesn't work.
p.s. file download links to come in a subsequent post.
Comment #4
sprite CreditAttribution: sprite as a volunteer commentedComment #5
cilefen CreditAttribution: cilefen commented"ill conceived and poorly designed" is not the way to motivate free support. Best of luck to you.
Comment #6
cilefen CreditAttribution: cilefen commentedSupport for that project is here: https://github.com/drupal-composer/drupal-project
Comment #7
cilefen CreditAttribution: cilefen commented"Install fails" is not an error log.
Comment #8
sprite CreditAttribution: sprite as a volunteer commentedHere is data relevant to this software bug available for download and analysis:
http://iisiteii.space/files/d8-composer-auto-project_setup-archive-non-w...
http://iisiteii.space/files/composer-create-project-drupal-project-php-c...
http://iisiteii.space/files/composer-create-project-drupal-project-php-c...
Comment #9
sprite CreditAttribution: sprite as a volunteer commentedComment #10
sprite CreditAttribution: sprite as a volunteer commentedIf you had waited just a little while ...
I was able to re-run the project script, produce archives and create all necessary relevant files and provide them download and analsis
---
As noted above the following three files are provided for analysis:
1. archive of all filed produced upon running the D8 drupal project creation script
2. echo output of result of running said script in a text file
3. relevant http access log error
http://iisiteii.space/files/d8-composer-auto-project_setup-archive-non-w...
http://iisiteii.space/files/composer-create-project-drupal-project-php-c...
http://iisiteii.space/files/composer-create-project-drupal-project-php-c...
---
The site location is accessible using a flat html and does not produce any http access errors.
-- iisiteii.space is not the site URL location
I am also able to upload an archived working D8 site produced using composer require drupal/core ~8.2
- a site install method with composer that works well
Comment #11
sprite CreditAttribution: sprite as a volunteer commentedAlthough you feel insulted and alienated by my valid and appropriate problem/bug report regarding the :
project script, cilefen .....
Maybe someone else will look into analyze and address this problem.
I suspect I'm not the only person who has encountered it, since I can reproduce the problem easily.
In fact the files provided at the links were created by reproducing the problem again after my initial report of it.
By the way, I provide a significant amount of free support to the Drupal community on a nearly daily basis, and have done so for over a decade.
Comment #12
cilefen CreditAttribution: cilefen commentedDo not make conclusions about my feelings.
The support you seek is at https://github.com/drupal-composer/drupal-project. This particular composer build is maintained separately from Drupal core and it has its own issue queue. People who are not me may help you there.
I expect you will not agree. That's fine. I've been trying to help you and it seems a mistake to have re-engaged, but I'm going to stop now.
Comment #13
rachel_norfolkJust tried this out using
composer create-project drupal-composer/drupal-project:8.x-dev next --stability dev --no-interaction
and then running install.php using Acquia Dev Desktop.
All works fine and installation was successful with a drupal/core version of 8.2.5
Installing other modules that have composer dependencies, like drupal/address working fine too.
The drupal-project layout is also the default in platform.sh D8 systems these days, I seem to remember.
Looks like something unsure to your environment, Sprite?
I won't mark as "Closed (Works as designed)" just yet, in case you have any further questions?
Comment #14
webflo CreditAttribution: webflo at UEBERBIT GmbH commented@sprite Please open an issue on the https://github.com/drupal-composer/drupal-project and provide the error log, the access log is not really helpful in this case. You may have to enable display_errors in your php config. Thanks!
Comment #15
cilefen CreditAttribution: cilefen commentedI am closing this as there were two contributors directing to the github issue queue.
Comment #16
sprite CreditAttribution: sprite as a volunteer commentedThe source of this problem appears to be an Apache or PHP security setting that refuses to run php files that are group writeable.
(error)
In fact, when using the composer drupal create project script, or any variant used by some distributors, it sets and leaves the permissions on the files at 664.
In order to get the Drupal installation to run after loading the files using the composer create project script, I had to create a shell script to scan through all the code directories and change all the file permissions.
-
When download and installing Drupal 8x. from the .zip archive, this problem does not occur, and the setup system also does not involve the non-standard directory configuration created by the composer script.
-
Comment #17
cilefen CreditAttribution: cilefen commentedI refer you back to prior comments. Drupal-composer is not supported in this issue queue. What change to Drupal core would fix this?
Comment #18
sprite CreditAttribution: sprite as a volunteer commentedI've been building Drupal websites for over a decade.
Given your stance just above, if the drupal.org website and its community doesn't or isn't going to support use of the composer utility, then the drupal.org website should not include any references to, recommendations for the use of, or documentation for, drupal setup/install with composer, or require (or even encourage) composer to install module code either.
Any requirements, and/or mandates, for composer's use by any part of Drupal should be eliminated as well, especially the (bad/poor) design of the /vendor directory which commingles 3rd php libraries used by core and by modules, and into which modules commingle their php libraries, thereby rendering many Drupal configuration impossible to update/maintain without the composer utility.
For example, all references to the use of composer for Drupal installation should be removed from the following documentation if the Drupal core community isn't going to support the use of the composer.
https://www.drupal.org/docs/8/install
-
As the following posts illustrate, I counsel beginner Drupal users in the forums to use a different methodology (even though using composer), precisely because of the problems proliferated by the faction pushing the use of composer and their non-standard, and apparently unsupported php scripts.
https://www.drupal.org/node/2903208
https://www.drupal.org/node/2903476
-
What is of prime importance is that the difficulties and problems illustrated by all this alienates potential beginner Drupal uses (not me), and restricts Drupal's use to only the most stalwart, hard core, development demographics. I observe these problems/barriers as represented by the sorts of questions frequently asked by Drupal beginners in the forums (a percentage of which I answer).
-
p.s. I only went back and took the time to figure out the problems with the composer project create because yet another D8 demo was suggested to someone, and it uses that composer project create script. I got it working. Ironically, the demo in question was useless too.
-
p.p.s - Yes I know the above is pragmatically impossible, since Drupal has already actually gone down a path such that the composer utility is essentially a mandate for maintaining Drupal 8 websites. Since Drupal 8 is now attached to the composer utility like a conjoined twin, any "operation" to separate the two would require a herculean effort.
Comment #19
cilefen CreditAttribution: cilefen commentedThere's an issue for that. So this is a documentation issue? I don't see what else there is to be fixed on this issue in this issue queue. Was the upstream issue asked for in #12 and #14 ever opened?
Comment #20
rachel_norfolkI have updated the documentation page mentioning drupal-composer/drupal-project and added a link describing where to obtain support and log issues for it.
See https://www.drupal.org/docs/develop/using-composer/using-composer-to-man...
and diff at https://www.drupal.org/node/2718229/revisions/view/10594293/10611207
Marked as Needs Review for someone to check that is clear.
Comment #21
cilefen CreditAttribution: cilefen commentedThank you. That looks perfect. It will direct site admins to the correct issue queue for issues such as these.