WordPress / playground-tools

GNU General Public License v2.0
127 stars 38 forks source link

The theme directory "twentytwentyfour" does not exist. #265

Open flexseth opened 2 months ago

flexseth commented 2 months ago

Error when booting in wp-content mode without a theme in the folder.

The theme directory "twentytwentyfour" does not exist. Error: The themes directory is either empty or does not exist. Please check your installation.

Why is this a problem

A theme is necessary to run any WordPress website. Let's make sure one is available.

Suggested fix

If no theme is in the wp-content/themes folder, install Twenty Twenty-Four

Step to install Twenty Twenty-Four (doesn't work but seems like it should)

{
    "step": "installTheme",
            "themeZipFile": {
                "resource": "wordpress.org/themes",
                "slug": "twentytwentyfour"
            },
            "options": {
                "activate": true
            }   
}

source: https://wordpress.github.io/wordpress-playground/blueprints-api/steps#InstallThemeStep**

Error code on attempted theme install - partially redacted

Starting the server...... directory:........./playground-docs-workflow/wp-content mode: wp-content php: 8.0 wp: 6.5.2 WordPress 6.5.2 folder already exists. Skipping download. SQLite folder already exists. Skipping download. blueprint steps: 3 Blueprint step completed: unzip Blueprint step completed: activatePlugin Error: Could not move /var/www/html/wp-content/ieU!7ZbrcT$JApjm3Z/5Z,wbT@NiKARm7ucg/assets/Twentytwentyfour/twentytwentyfour to /var/www/html/wp-content/themes/twentytwentyfour: There is no such file or directory OR the parent directory does not exist.

Affects

How to re-create the issue

flexseth commented 2 months ago

Possibly related

flexseth commented 2 months ago

Looks like it may be a URL or "resource type" issue

Screenshot 2024-04-12 at 9 56 43 PM Screenshot 2024-04-12 at 9 55 36 PM
sejas commented 2 months ago

The repository https://github.com/adamziel/playground-docs-workflow doesn't load the frontpage, but it does load the /wp-admin.

landingPage

Error loading the home:

The theme directory "twentytwentyfour" does not exist.
Error: The themes directory is either empty or does not exist. Please check your installation.

So my fix would be to wp-now auto open the blueprint.json landingPage

https://github.com/WordPress/wordpress-playground/assets/779993/6ac20184-51b9-478b-af58-5d42ce23e9ea

Theme

For installing the theme step, it can be fixed by adding a themes empty folder to https://github.com/adamziel/playground-docs-workflow/tree/trunk/wp-content

https://github.com/WordPress/wordpress-playground/assets/779993/e9b75726-7f83-4df6-b926-7849b4cf0f4d

flexseth commented 2 months ago

Maybe related

flexseth commented 2 months ago

The repository https://github.com/adamziel/playground-docs-workflow doesn't load the frontpage, but it does load the /wp-admin.

Finally putting together what you meant!

Docs workflow is a WIP - closing

adamziel commented 2 months ago

Reopening, I’d still like to investigate possible solutions.

nextgenthemes commented 3 weeks ago

On Ubuntu 22.04 desktop. I am getting this error by simply doing this command inside my plugin directory

npx @wp-now/wp-now start --reset

Same without reset. Is this not how

Without any blueprint. Is this now how It's supposed to work out of the box? "From a plugin or theme dir".

I tried deleting .wp-now

tree ~/.wp-now -L 3
/home/user-name/.wp-now
├── mu-plugins
│   ├── 0-allow-wp-org.php
│   ├── 1-pretty-permalinks.php
│   ├── 2-deactivate-sqlite-plugin.php
│   └── sqlite-database-integration-main
│       ├── activate.php
│       ├── admin-notices.php
│       ├── admin-page.php
│       ├── constants.php
│       ├── db.copy
│       ├── deactivate.php
│       ├── health-check.php
│       ├── LICENSE
│       ├── load.php
│       ├── php-polyfills.php
│       ├── readme.txt
│       └── wp-includes
├── wordpress-versions
│   └── latest
│       ├── index.php
│       ├── license.txt
│       ├── readme.html
│       ├── wp-activate.php
│       ├── wp-admin
│       ├── wp-blog-header.php
│       ├── wp-comments-post.php
│       ├── wp-config.php
│       ├── wp-config-sample.php
│       ├── wp-content
│       ├── wp-cron.php
│       ├── wp-includes
│       ├── wp-links-opml.php
│       ├── wp-load.php
│       ├── wp-login.php
│       ├── wp-mail.php
│       ├── wp-settings.php
│       ├── wp-signup.php
│       ├── wp-trackback.php
│       └── xmlrpc.php
└── wp-content
    └── advanced-responsive-video-embedder-c139e432949fd1ae0b6e5001f7a32f8f067f0439
        └── database

Everything in there seems to be created correctly.