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

Adding a product to Woocommerce creates a critical error #602

Closed
Tracked by #653
tomswales opened this issue Jul 17, 2023 · 6 comments
Closed
Tracked by #653

Adding a product to Woocommerce creates a critical error #602

tomswales opened this issue Jul 17, 2023 · 6 comments
Labels
[Type] Bug An existing feature does not function as intended

Comments

@tomswales
Copy link

tomswales commented Jul 17, 2023

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.

@eliot-akira
Copy link
Collaborator

eliot-akira commented Jul 17, 2023

From the last screenshot, apparently the error is that the file wp-includes/post.php is missing. I wonder how that could happen.

As a comparison, I followed the above steps and wasn't able to reproduce the issue on Ubuntu 22.04, Firefox and Chromium. But the issue doesn't seem like it would be specific to the operating system or browser.

I also tried on a regular Playground instance without the client, from:

https://playground.wordpress.net/?plugin=woocommerce

And was able to create a product successfully.


Are you able to reproduce this issue reliably every time?

Also, is there any JavaScript error in the browser dev console?

@tomswales
Copy link
Author

tomswales commented Jul 18, 2023

Are you able to reproduce this issue reliably every time?

Yes, every time, both with client on localhost and in the regular Playground instance using https://playground.wordpress.net/?plugin=woocommerce

Also, is there any JavaScript error in the browser dev console?

Yes, there is an error:
Uncaught TypeError: s.toLowerCase is not a function at should_fill_on_click (VM163 onloadwff.js:71:579116) at VM163 onloadwff.js:71:144177

Screenshot 2023-07-18 at 14 40 06

@eliot-akira
Copy link
Collaborator

eliot-akira commented Jul 19, 2023

Thank you for the details, that's helpful information. Since I'm not seeing the error on my side with multiple browsers on Linux, I guess it could be specific to the operating system. Does it happen on Safari?

From the screenshot, it looks like a script inside the embedded site throws an error, which somehow causes (or appears to cause) a corruption in the virtual file system of the Playground.

@tomswales
Copy link
Author

Yes, also happens on Safari, exactly the same behaviour...

@adamziel
Copy link
Collaborator

I wonder if that's the same issue as #603. I suspect faulty deployment and both were filled around the same date.

@tomswales can you still reproduce the problem? What if you clear the browser cache?

@adamziel adamziel added the [Type] Bug An existing feature does not function as intended label Sep 29, 2023
@adamziel adamziel mentioned this issue Oct 4, 2023
10 tasks
@adamziel
Copy link
Collaborator

I'm closing this one. @tomswales If this happens up again please drop a comment and I'll reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants