Skip to content

Adding a product to Woocommerce creates a critical error #602

@tomswales

Description

@tomswales

Issue

Adding a new product in Woocommerce causes critical error

System

Macbook Pro
MacOS 13.3.1
Browser Chrome Version 114.0.5735.198 (Official Build) (x86_64)

Replication

Playground code:

<!DOCTYPE html>
<html>

<head>
	<title>Woocommerce Playground</title>
    <meta charset="utf-8"  />
    <meta name="viewport" content="width=device-width">
</head>

<body>

    <iframe
        id="wp"
    ></iframe>

</body>

<script type="module">
    import { startPlaygroundWeb } from 'https://unpkg.com/@wp-playground/client/index.js';

    const client = await startPlaygroundWeb({
        iframe: document.getElementById('wp'),
        remoteUrl: `https://playground.wordpress.net/remote.html`,
        blueprint: {
            preferredVersions: {
                wp: '6.2',
                php: '8.0',
            },
            steps: [
                { step: 'login' },
                {
                    step: 'installPlugin',
                    pluginZipFile: {
                        resource: 'wordpress.org/plugins',
                        slug: 'woocommerce',
                    },
                }
            ],
        },
    });
    await client.isReady();
</script>

<style>
    body {
        margin:0;
        padding: 0;
    }

    iframe {
        width: 100vw; height: 100vh; border: none;
    }
</style>
</html>

When wordpress is loaded, then:

  • Go to "My Website details"
Screenshot 2023-07-17 at 15 36 26
  • When flow for setting up store details appears, skip it
Screenshot 2023-07-17 at 15 37 55
  • Go to add products and follow flow for physical products
Screenshot 2023-07-17 at 15 38 33
  • Add product details and press Publish
Screenshot 2023-07-17 at 15 41 55
  • Should see this error message
Screenshot 2023-07-17 at 15 42 25

Error text

Warning: require(/wordpress/wp-includes/post.php): Failed to open stream: No such file or directory in /wordpress/wp-settings.php on line 2

Fatal error: Uncaught Error: Failed opening required '/wordpress/wp-includes/post.php' (include_path='.:') in /wordpress/wp-settings.php:2 Stack trace: #0 /wordpress/wp-config.php(11): require_once() #1 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...') #2 /wordpress/wp-admin/admin.php(2): require_once('/wordpress/wp-l...') #3 /wordpress/wp-admin/post.php(2): require_once('/wordpress/wp-a...') #4 {main} thrown in /wordpress/wp-settings.php on line 2
There has been a critical error on this website.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions