Skip to content

Errors running WooCommerce #19

Open
@bart-jaskulski

Description

@bart-jaskulski

I've been testing new implementation with WooCommerce, as it's both useful to me and quite elaborate when it comes to database operations.

So far, so good!

I've stumbled upon some minor errors, which seeming doesn't affect overall user experience, but this may lead to further problems.

At first, after WooCommerce activation I've been welcomed (already with SQLite database installed) by white screen with error. I truncated the output a bit, as it's illegible in its full form, but attached it also as gist)

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 INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES (***loads of values***) ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)</p> <p>Queries made or created this session were:</p> <ol> <li>Executing: BEGIN | (no parameters)</li> <li>Executing: SELECT * FROM pragma_table_info(:table_name) as l WHERE l.pk &gt; 0; | (no parameters)</li> <li>Executing: SELECT * FROM pragma_index_list(&quot;wp_options&quot;) as l; | (no parameters)</li> <li>Executing: SELECT * FROM pragma_index_info(&quot;wp_options__option_name&quot;) as l; | (no parameters)</li> <li>Executing: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES (:param0 , :param1 , :param2 ) ON CONFLICT (&quot;option_name&quot;) DO UPDATE SET `option_name` = excluded.`option_name`, `option_value` = excluded.`option_value`, `autoload` = excluded.`autoload` | parameters: ***previous values as parameters***</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 2881 in Function <code>handle_error</code>. Error message was: Problem preparing the PDO SQL Statement.** Error was: SQLSTATE[HY000]: General error: 5 database is locked.** trace: #0 /var/www/html/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-translator.php(2992): PDOStatement->execute(Array) #1 /var/www/html/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-translator.php(1511): WP_SQLite_Translator->execute_sqlite_query('INSERT INTO `wp...', Array) #2 /var/www/html/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-translator.php(649): WP_SQLite_Translator->execute_insert_or_replace() #3 /var/www/html/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-translator.php(502): WP_SQLite_Translator->execute_mysql_query('INSERT INTO `wp...') #4 /var/www/html/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-db.php(282): WP_SQLite_Translator->query('INSERT INTO `wp...') #5 /var/www/html/wp-includes/option.php(664): WP_SQLite_DB->query('INSERT INTO `wp...') #6 /var/www/html/wp-includes/option.php(972): add_option('_transient_wooc...', Array, '', 'no') #7 /var/www/html/wp-content/plugins/woocommerce/src/Admin/DataSourcePoller.php(143): set_transient('woocommerce_adm...', Array, 604800) #8 /var/www/html/wp-content/plugins/woocommerce/src/Admin/DataSourcePoller.php(112): Automattic\WooCommerce\Admin\DataSourcePoller->read_specs_from_data_sources() #9 /var/www/html/wp-content/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/Init.php(72): Automattic\WooCommerce\Admin\DataSourcePoller->get_specs_from_data_sources() #10 /var/www/html/wp-content/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/Init.php(33): Automattic\WooCommerce\Internal\Admin\RemoteFreeExtensions\Init::get_specs() #11 /var/www/html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Marketing.php(84): Automattic\WooCommerce\Internal\Admin\RemoteFreeExtensions\Init::get_extensions(Array) #12 /var/www/html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Marketing.php(73): Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\Marketing::get_plugins() #13 /var/www/html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php(304): Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\Marketing->can_view() #14 [internal function]: Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskList->Automattic\WooCommerce\Admin\Features\OnboardingTasks\{closure}(Object(Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\Marketing)) #15 /var/www/html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php(305): array_filter(Array, Object(Closure)) #16 /var/www/html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php(239): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskList->get_viewable_tasks() #17 /var/www/html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php(445): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskList->is_complete() #18 /var/www/html/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php(467): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists::setup_tasks_remaining() #19 /var/www/html/wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists::menu_task_count('') #20 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #21 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #22 /var/www/html/wp-admin/includes/menu.php(155): do_action('admin_menu', '') #23 /var/www/html/wp-admin/menu.php(428): require_once('/var/www/html/w...') #24 /var/www/html/wp-admin/admin.php(158): require('/var/www/html/w...') #25 /var/www/html/wp-admin/plugins.php(10): require_once('/var/www/html/w...') #26 {main}. </div>***truncated backtrace***

Another error found at order edit page (after successful submission):

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>SELECT DISTINCT meta_key FROM wp_postmeta WHERE meta_key NOT BETWEEN '_' AND '_z' HAVING meta_key NOT LIKE '_%' ORDER BY meta_key LIMIT 30</p> <p>Queries made or created this session were:</p> <ol> <li>Executing: BEGIN | (no parameters)</li> <li>Executing: SELECT DISTINCT meta_key FROM wp_postmeta WHERE meta_key NOT BETWEEN :param0 AND :param1 HAVING meta_key NOT LIKE :param2 ORDER BY meta_key LIMIT 30 | parameters: _, _z, _%</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 2881 in Function <code>handle_error</code>. Error message was: Problem preparing the PDO SQL Statement. Error was: SQLSTATE[HY000]: General error: 1 a GROUP BY clause is required before HAVING. trace: #0 /var/www/html/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-translator.php(2991): PDO->prepare('SELECT DISTINCT...') #1 /var/www/html/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-translator.php(1320): WP_SQLite_Translator->execute_sqlite_query('SELECT DISTINCT...', Array) #2 /var/www/html/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-translator.php(644): WP_SQLite_Translator->execute_select() #3 /var/www/html/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-translator.php(502): WP_SQLite_Translator->execute_mysql_query('SELECT DISTINCT...') #4 /var/www/html/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-db.php(282): WP_SQLite_Translator->query('SELECT DISTINCT...') #5 /var/www/html/wp-includes/class-wpdb.php(2816): WP_SQLite_DB->query('SELECT DISTINCT...') #6 /var/www/html/wp-admin/includes/template.php(701): wpdb->get_col('SELECT DISTINCT...') #7 /var/www/html/wp-admin/includes/meta-boxes.php(776): meta_form(Object(WP_Post)) #8 /var/www/html/wp-admin/includes/template.php(1409): post_custom_meta_box(Object(WP_Post), Array) #9 /var/www/html/wp-admin/edit-form-advanced.php(688): do_meta_boxes(Object(WP_Screen), 'normal', Object(WP_Post)) #10 /var/www/html/wp-admin/post.php(206): require('/var/www/html/w...') #11 {main}. </div> <p>Backtrace:</p> <pre>#0 /var/www/html/wp-content/plugins/sqlite-database-integration/wp-includes/sqlite/class-wp-sqlite-db.php(289): WP_SQLite_Translator-&gt;get_error_message() #1 /var/www/html/wp-includes/class-wpdb.php(2816): WP_SQLite_DB-&gt;query('SELECT DISTINCT...') #2 /var/www/html/wp-admin/includes/template.php(701): wpdb-&gt;get_col('SELECT DISTINCT...') #3 /var/www/html/wp-admin/includes/meta-boxes.php(776): meta_form(Object(WP_Post)) #4 /var/www/html/wp-admin/includes/template.php(1409): post_custom_meta_box(Object(WP_Post), Array) #5 /var/www/html/wp-admin/edit-form-advanced.php(688): do_meta_boxes(Object(WP_Screen), 'normal', Object(WP_Post)) #6 /var/www/html/wp-admin/post.php(206): require('/var/www/html/w...') #7 {main}</pre> ] SELECT DISTINCT meta_key FROM wp_postmeta WHERE meta_key NOT BETWEEN '_' AND '_z' HAVING meta_key NOT LIKE '_%' ORDER BY meta_key LIMIT 30

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions