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

Add blueprint file for user previews #4

Closed
remcotolsma opened this issue Mar 26, 2024 · 5 comments
Closed

Add blueprint file for user previews #4

remcotolsma opened this issue Mar 26, 2024 · 5 comments
Assignees

Comments

@remcotolsma
Copy link
Member

remcotolsma commented Mar 26, 2024

On https://wordpress.org/plugins/pronamic-pay-with-mollie-for-gravity-forms/ i see:

wordpress org_plugins_pronamic-pay-with-mollie-for-gravity-forms_

Currently https://playground.wordpress.net/?blueprint-url=https%3A%2F%2Fwordpress.org%2Fplugins%2Fwp-json%2Fplugins%2Fv1%2Fplugin%2Fpronamic-pay-with-mollie-for-gravity-forms%2Fblueprint.json%3Furl_hash%3Dc2dcadc96fceee6000d05322935c19de is giving:

There has been a critical error on this website. Please check your site admin email inbox for instructions.

I think this is related to the custom tables we use for Mollie, that's not working good in SQLite?

To further investigate this i was working on:

CC @rvdsteege

Links:

@remcotolsma remcotolsma self-assigned this Mar 26, 2024
@remcotolsma remcotolsma moved this from Todo to In Progress in Pronamic Pay Mar 26, 2024
@remcotolsma
Copy link
Member Author

On https://wordpress.org/plugins/pronamic-pay-with-mollie-for-gravity-forms/ the following blueprint.json is used: https://wordpress.org/plugins/wp-json/plugins/v1/plugin/pronamic-pay-with-mollie-for-gravity-forms/blueprint.json?url_hash=c2dcadc96fceee6000d05322935c19de.

{
    "landingPage": "\/wp-admin\/plugins.php",
    "preferredVersions": {
        "php": "8.0",
        "wp": "latest"
    },
    "phpExtensionBundles": [
        "kitchen-sink"
    ],
    "features": {
        "networking": true
    },
    "steps": [
        {
            "step": "installPlugin",
            "pluginZipFile": {
                "resource": "url",
                "url": "https:\/\/downloads.wordpress.org\/plugin\/pronamic-pay-with-mollie-for-gravity-forms.1.4.0.zip"
            },
            "options": {
                "activate": true
            }
        },
        {
            "step": "login",
            "username": "admin",
            "password": "password"
        }
    ]
}

@remcotolsma
Copy link
Member Author

Just tested: errors:

[17-Apr-2024 13:39:50 UTC] PHP-WASM Fatal: PHP.run() failed with exit code 255 and the following output:  Error: PHP.run() failed with exit code 255 and the following output: 
    at WebPHP.run (https://playground.wordpress.net/worker-thread-5d9d5bce.js?wpVersion=6.5&phpVersion=8.0&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=none:41:11662)
    at async #l (https://playground.wordpress.net/worker-thread-5d9d5bce.js?wpVersion=6.5&phpVersion=8.0&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=none:41:2926)
    at async PHPRequestHandler.request (https://playground.wordpress.net/worker-thread-5d9d5bce.js?wpVersion=6.5&phpVersion=8.0&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=none:41:1490)
    at async PHPBrowser.request (https://playground.wordpress.net/worker-thread-5d9d5bce.js?wpVersion=6.5&phpVersion=8.0&php-extension=iconv&php-extension=mbstring&php-extension=xml-bundle&php-extension=gd&networking=yes&storage=none:35:4937)[17-Apr-2024 13:39:50 UTC] WordPress database error <div style="clear:both">&nbsp;</div>
<div class="queries" style="clear:both;margin-bottom:2px;border:red dotted thin;">
<p>MySQL query:</p>
<p>
			INSERT IGNORE INTO wp_pronamic_pay_mollie_customer_users (
				customer_id,
				user_id
			)
			SELECT
				mollie_customer.id AS mollie_customer_id,
				wp_user.ID AS wp_user_id
			FROM
				wp_pronamic_pay_mollie_customers AS mollie_customer
					INNER JOIN
				wp_usermeta AS wp_user_meta
						ON BINARY wp_user_meta.meta_value = mollie_customer.mollie_id
					INNER JOIN
				wp_users AS wp_user
						ON wp_user_meta.user_id = wp_user.ID
			WHERE
				wp_user_meta.meta_key IN (
					'_pronamic_pay_mollie_customer_id',
					'_pronamic_pay_mollie_customer_id_test'
				)
					AND
				wp_user_meta.meta_value != ''
			;
		</p>
<p>Queries made or created this session were:</p>
<ol>
<li>Executing: BEGIN | (no parameters)</li>
<li>Executing: 
			INSERT OR IGNORE INTO wp_pronamic_pay_mollie_customer_users (
				customer_id,
				user_id
			)
			SELECT
				mollie_customer.id AS mollie_customer_id,
				wp_user.ID AS wp_user_id
			FROM
				wp_pronamic_pay_mollie_customers AS mollie_customer
					INNER JOIN
				wp_usermeta AS wp_user_meta
						ON BINARY wp_user_meta.meta_value = mollie_customer.mollie_id
					INNER JOIN
				wp_users AS wp_user
						ON wp_user_meta.user_id = wp_user.ID
			WHERE
				wp_user_meta.meta_key IN (
					:param0 ,
					:param1 
				)
					AND
				wp_user_meta.meta_value != :param2 
			;
		 | parameters: _pronamic_pay_mollie_customer_id, _pronamic_pay_mollie_customer_id_test, </li>
<li>Executing: ROLLBACK | (no parameters)</li>
</ol>
</div>
<div style="clear:both;margin-bottom:2px;border:red dotted thin;" class="error_message" style="border-bottom:dotted blue thin;">
Error occurred at line 3639 in Function <code>handle_error</code>. Error message was: SQLSTATE[HY000]: General error: 1 near "wp_user_meta": syntax error.
</div>
<p>Backtrace:</p>
<pre>#0 /wordpress/wp-content/mu-plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-db.php(287): WP_SQLite_Translator->get_error_message()
#1 /wordpress/wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/wp-pay-gateways/mollie/src/Install.php(372): WP_SQLite_DB->query('\n\t\t\tINSERT IGNO...')
#2 /wordpress/wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/wp-pay-gateways/mollie/src/Install.php(28): Pronamic\WordPress\Pay\Gateways\Mollie\Install->convert_user_meta()
#3 /wordpress/wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/wp-pay/core/src/Admin/Install.php(87): Pronamic\WordPress\Pay\Gateways\Mollie\Install->execute()
#4 /wordpress/wp-includes/class-wp-hook.php(3): Pronamic\WordPress\Pay\Admin\Install->init('')
#5 /wordpress/wp-includes/class-wp-hook.php(3): WP_Hook->apply_filters(NULL, Array)
#6 /wordpress/wp-includes/plugin.php(2): WP_Hook->do_action(Array)
#7 /wordpress/wp-settings.php(2): do_action('init')
#8 /wordpress/wp-config.php(104): require_once('/wordpress/wp-s...')
#9 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...')
#10 /wordpress/wp-admin/admin.php(2): require_once('/wordpress/wp-l...')
#11 /wordpress/wp-admin/plugins.php(2): require_once('/wordpress/wp-a...')
#12 {main}</pre>
 for query 
			INSERT IGNORE INTO wp_pronamic_pay_mollie_customer_users (
				customer_id,
				user_id
			)
			SELECT
				mollie_customer.id AS mollie_customer_id,
				wp_user.ID AS wp_user_id
			FROM
				wp_pronamic_pay_mollie_customers AS mollie_customer
					INNER JOIN
				wp_usermeta AS wp_user_meta
						ON BINARY wp_user_meta.meta_value = mollie_customer.mollie_id
					INNER JOIN
				wp_users AS wp_user
						ON wp_user_meta.user_id = wp_user.ID
			WHERE
				wp_user_meta.meta_key IN (
					'_pronamic_pay_mollie_customer_id',
					'_pronamic_pay_mollie_customer_id_test'
				)
					AND
				wp_user_meta.meta_value != ''
			;
		 made by require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, Pronamic\WordPress\Pay\Admin\Install->init, Pronamic\WordPress\Pay\Gateways\Mollie\Install->execute, Pronamic\WordPress\Pay\Gateways\Mollie\Install->convert_user_meta, WP_SQLite_DB->query, WP_SQLite_DB->print_error
[17-Apr-2024 13:39:50 UTC] PHP Fatal error:  Uncaught Exception: Could not convert user meta, database error: &lt;div style=&quot;clear:both&quot;&gt;&nbsp;&lt;/div&gt;
&lt;div class=&quot;queries&quot; style=&quot;clear:both;margin-bottom:2px;border:red dotted thin;&quot;&gt;
&lt;p&gt;MySQL query:&lt;/p&gt;
&lt;p&gt;
			INSERT IGNORE INTO wp_pronamic_pay_mollie_customer_users (
				customer_id,
				user_id
			)
			SELECT
				mollie_customer.id AS mollie_customer_id,
				wp_user.ID AS wp_user_id
			FROM
				wp_pronamic_pay_mollie_customers AS mollie_customer
					INNER JOIN
				wp_usermeta AS wp_user_meta
						ON BINARY wp_user_meta.meta_value = mollie_customer.mollie_id
					INNER JOIN
				wp_users AS wp_user
						ON wp_user_meta.user_id = wp_user.ID
			WHERE
				wp_user_meta.meta_key IN (
					&#039;_pronamic_pay_mollie_customer_id&#039;,
					&#039;_pronamic_pay_mollie_customer_id_test&#039;
				)
					AND
				wp_user_meta.meta_value != &#039;&#039;
			;
		&lt;/p&gt;
&lt;p&gt;Queries made or created this session were:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Executing: BEGIN | (no parameters)&lt;/li&gt;
&lt;li&gt;Executing: 
			INSERT OR IGNORE INTO wp_pronamic_pay_mollie_customer_users (
				customer_id,
				user_id
			)
			SELECT
				mollie_customer.id AS mollie_customer_id,
				wp_user.ID AS wp_user_id
			FROM
				wp_pronamic_pay_mollie_customers AS mollie_customer
					INNER JOIN
				wp_usermeta AS wp_user_meta
						ON BINARY wp_user_meta.meta_value = mollie_customer.mollie_id
					INNER JOIN
				wp_users AS wp_user
						ON wp_user_meta.user_id = wp_user.ID
			WHERE
				wp_user_meta.meta_key IN (
					:param0 ,
					:param1 
				)
					AND
				wp_user_meta.meta_value != :param2 
			;
		 | parameters: _pronamic_pay_mollie_customer_id, _pronamic_pay_mollie_customer_id_test, &lt;/li&gt;
&lt;li&gt;Executing: ROLLBACK | (no parameters)&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;clear:both;margin-bottom:2px;border:red dotted thin;&quot; class=&quot;error_message&quot; style=&quot;border-bottom:dotted blue thin;&quot;&gt;
Error occurred at line 3639 in Function &lt;code&gt;handle_error&lt;/code&gt;. Error message was: SQLSTATE[HY000]: General error: 1 near &quot;wp_user_meta&quot;: syntax error.
&lt;/div&gt;
&lt;p&gt;Backtrace:&lt;/p&gt;
&lt;pre&gt;#0 /wordpress/wp-content/mu-plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-db.php(287): WP_SQLite_Translator-&gt;get_error_message()
#1 /wordpress/wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/wp-pay-gateways/mollie/src/Install.php(372): WP_SQLite_DB-&gt;query(&#039;\n\t\t\tINSERT IGNO...&#039;)
#2 /wordpress/wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/wp-pay-gateways/mollie/src/Install.php(28): Pronamic\WordPress\Pay\Gateways\Mollie\Install-&gt;convert_user_meta()
#3 /wordpress/wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/wp-pay/core/src/Admin/Install.php(87): Pronamic\WordPress\Pay\Gateways\Mollie\Install-&gt;execute()
#4 /wordpress/wp-includes/class-wp-hook.php(3): Pronamic\WordPress\Pay\Admin\Install-&gt;init(&#039;&#039;)
#5 /wordpress/wp-includes/class-wp-hook.php(3): WP_Hook-&gt;apply_filters(NULL, Array)
#6 /wordpress/wp-includes/plugin.php(2): WP_Hook-&gt;do_action(Array)
#7 /wordpress/wp-settings.php(2): do_action(&#039;init&#039;)
#8 /wordpress/wp-config.php(104): require_once(&#039;/wordpress/wp-s...&#039;)
#9 /wordpress/wp-load.php(2): require_once(&#039;/wordpress/wp-c...&#039;)
#10 /wordpress/wp-admin/admin.php(2): require_once(&#039;/wordpress/wp-l...&#039;)
#11 /wordpress/wp-admin/plugins.php(2): require_once(&#039;/wordpress/wp-a...&#039;)
#12 {main}&lt;/pre&gt;
. in /wordpress/wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/wp-pay-gateways/mollie/src/Install.php:375
Stack trace:
#0 /wordpress/wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/wp-pay-gateways/mollie/src/Install.php(28): Pronamic\WordPress\Pay\Gateways\Mollie\Install->convert_user_meta()
#1 /wordpress/wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/wp-pay/core/src/Admin/Install.php(87): Pronamic\WordPress\Pay\Gateways\Mollie\Install->execute()
#2 /wordpress/wp-includes/class-wp-hook.php(3): Pronamic\WordPress\Pay\Admin\Install->init('')
#3 /wordpress/wp-includes/class-wp-hook.php(3): WP_Hook->apply_filters(NULL, Array)
#4 /wordpress/wp-includes/plugin.php(2): WP_Hook->do_action(Array)
#5 /wordpress/wp-settings.php(2): do_action('init')
#6 /wordpress/wp-config.php(104): require_once('/wordpress/wp-s...')
#7 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...')
#8 /wordpress/wp-admin/admin.php(2): require_once('/wordpress/wp-l...')
#9 /wordpress/wp-admin/plugins.php(2): require_once('/wordpress/wp-a...')
#10 {main}
  thrown in /wordpress/wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/wp-pay-gateways/mollie/src/Install.php on line 375

@remcotolsma
Copy link
Member Author

Unfortunately, this does not seem possible yet, due to the following issue:

@remcotolsma remcotolsma closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Pronamic Pay Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant