- Issue created by @hondaman900
- Status changed to Postponed: needs info
11 months ago 7:01pm 27 January 2024 I can't reproduce this bug as written:
php core/scripts/drupal generate-theme my_new_theme works as documented.
core/scripts/drupal cannot be both a folder and an executable PHP script.
There issue mentions that
php core/scripts/drupal generate-theme my_new_theme
fails but doesn't show the output, etc.I am moving this to a support request pending a bug reproduction.
- πΊπΈUnited States hondaman900
@cilefen did you try this on the current 10.2.2 download? As shown in the screenshot, that folder and it's contents are not in the 10.2.2 package. It can't possibly work.
- πΊπΈUnited States hondaman900
@cilefen UPDATE
Am I missing something here? I've downloaded several Drupal core zips going back to 2022 (10.0.0) and none have the
core/scrips/drupal
folder.Is there some additional installation process that needs to be done after downloading the core to implement the theme starterkit?
- πΊπΈUnited States andy-blum Ohio, USA
Core/scripts/drupal is an extensionless file, not a folder. It is the 7th item in your screenshot.
- π¬π§United Kingdom longwave UK
You said
Trying to run
php core/scripts/drupal generate-theme mytheme
per instructions, failsNote the space after "drupal".
What error do you get? Please copy and paste the command and the output.
- πΊπΈUnited States hondaman900
@longwave I get this response to the following command:
stephen@stephen-ubuntu:~/rvmn/web$ ddev . php core/scripts/drupal generate-theme RVNM Could not open input file: core/scripts/drupal Failed to execute command php core/scripts/drupal generate-theme RVNM: exit status 1
@hondaman900 Verify you can run this the ordinary way outside of DDEV:
php core/scripts/drupal generate-theme my_new_theme
.- πΊπΈUnited States hondaman900
@cilefen running the command without
DDEV
gives an error saying there's noPHP
and prompting me to install it. This makes sense as withoutDDEV
at the beginning of the command I'm doing that outside the virtual instance which has its own isolatedPHP
.I'm reluctant to follow the prompt and install
PHP
as I have no idea if this will interfere with theDDEV
environment and the site. Ideally installingPHP
on my system will not bleed over or effect myDDEV
environment, and if not, then running the command outside ofDDEV
may be enough to generate the subtheme and move on?Seems that with the prevalence of
DDEV
that this would have come up with someone else prior to now...? - πΊπΈUnited States andy-blum Ohio, USA
You should definitely be able to run the command inside ddev.
There are a couple ways to accomplish this:
- Run
ddev ssh
. This will allow you to run commands inside the container. - Run
ddev exec php [command]
. This will pass the command into the container and then running it without changing your entire CLI environment
The tricky part of the second version is you have to know what the current working directory is. By default it's /var/www/html/, and if your drupal installation is inside a "web" directory, you have to add that part to your command.
Try running
ddev exec php web/core/scripts/drupal generate-theme mytheme
and see if that works. - Run
- πΊπΈUnited States hondaman900
Ok, so I gave it a shot and installed
PHP 8.1
outside ofDDEV
and ran the starterkit command successfully.I'm wondering why this doesn't work though inside the virtual instance. Perhaps this should be corrected/enabled for future users?
Thanks for the help with this - I'm now good to go.
Apologies for mistakenly portraying this as the starterkit being missing which, in retrospect, wasn't the case.
- Status changed to Closed: works as designed
11 months ago 3:42pm 30 January 2024 - π¬π§United Kingdom longwave UK
Thanks for testing that and reporting back. Closing as works as designed.
ddev exec
(akaddev .
) always runs commands from the top level directory of the project, even if you are inside a subdirectory when you run it.It looks like you are using the recommended layout and your webroot is in a subdirectory called
web
. This command should work for you:$ ddev . php web/core/scripts/drupal generate-theme RVNM