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

[Database] Exported and hosted Playground site can't connect to Jetpack #708

Open
adamziel opened this issue Oct 18, 2023 · 2 comments
Open
Labels
[Aspect] Sqlite [Type] Bug An existing feature does not function as intended

Comments

@adamziel
Copy link
Collaborator

When connecting a Playground site to Jetpack, the following error shows up:

CleanShot 2023-10-17 at 11 36 17@2x

@sergeymitr pointed out there must be some database issue in the Playground site:

Looks like the site experiences issues with the database.
The site gets registered successfully, but it’s unable to save the blog ID or connection token. Then it generates the URL to establish user connection, tries to load blog ID from the options and fails.
So it doesn’t seem to be a connection issue, rather inability to properly connect the site due to option saving issues.

Jetpack is a commercial plugin, but the error is likely related to the SQLite integration in WordPress Playground and may affect other plugins.

@adamziel adamziel added the [Type] Bug An existing feature does not function as intended label Oct 18, 2023
@adamziel
Copy link
Collaborator Author

More info from @sergeymitr:


No fancy MySQL queries, it just doesn’t save the options.

I created a test plugin in playground/wp-content/plugins/save-options-test.php to test simple update_options() call, and it works for the non-playground install you have there, but doesn’t work for the playground:

Works fine:
https://charming-grasshopper.jurassic.ninja/wp-admin/?sm_test_save_option=1
https://charming-grasshopper.jurassic.ninja/wp-admin/?sm_test_get_option=1

Doesn’t work:
https://charming-grasshopper.jurassic.ninja/playground/wp-admin/?sm_test_save_option=1
https://charming-grasshopper.jurassic.ninja/playground/wp-admin/?sm_test_get_option=1

The code is pretty straightforward:

add_action( 'init', function() {
        if ( ! empty( $_GET['sm_test_save_option'] ) ) {
                $result = update_option( 'sm_test_option', 'test_value' );
                var_dump( $result );
                die();
        }

        if ( ! empty( $_GET['sm_test_get_option'] ) ) {
                var_dump( get_option( 'sm_test_option' ) );
                die();
        }
} );

@adamziel
Copy link
Collaborator Author

Interestingly, I wasn't able to reproduce this with a local Playground, nor with a local wp-now installation. Maybe the problem is specific to an exported Playground instance?

This was referenced Nov 22, 2023
@adamziel adamziel added this to the Zero Crashes milestone Feb 29, 2024
@adamziel adamziel moved this to Future work in Playground Board Jun 30, 2024
@adamziel adamziel removed this from the Zero Crashes milestone Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] Sqlite [Type] Bug An existing feature does not function as intended
Projects
Archived in project
Development

No branches or pull requests

1 participant