-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Common Issues
This page aims to document a comprehensive list of known issues, commonly encountered problems, and their solutions or workaround. If you have encountered an issue that's not mentioned here and should be, please don't hesitate to add to the list!
[ErrorException]
Declaration of Automattic\Jetpack\Autoloader\AutoloadGenerator::dump(Composer\Config $config, Composer\Repository\Inst
alledRepositoryInterface $localRepo, Composer\Package\PackageInterface $mainPackage, Composer\Installer\InstallationMa
nager $installationManager, $targetDir, $scanPsrPackages = false, $suffix = NULL) should be compatible with Composer\A
utoload\AutoloadGenerator::dump(Composer\Config $config, Composer\Repository\InstalledRepositoryInterface $localRepo,
Composer\Package\RootPackageInterface $rootPackage, Composer\Installer\InstallationManager $installationManager, $targ
etDir, $scanPsrPackages = false, $suffix = '')
A recent change in composer released in 2.0.7
had made our autoloader incompatible with the new AutoloadGenerator
signature. In the meantime, try to downgrade to older composer version 2.0.6
using composer self-update 2.0.6
.
...vagrant-hostsupdater/HostsUpdater.rb:126:in ``digest': no implicit conversion of nil into String (TypeError)
You might be running with an unsupported version of Vagrant. At the time of writing, I confirm that VVV works with Vagrant 2.2.7. Please check VVV's requirements.
mysqladmin: CREATE DATABASE failed; error: 'Access denied for user 'wp'@'localhost' to database 'wordpress-one-tests''
Fix
- Open mysql with
sudo mysql
- Run
GRANT ALL PRIVILEGES ON * . * TO 'wp'@'localhost';
you can exit by typingexit;
. - Run the
install-wp-tests.sh
script again.
Store owner can complete onboarding wizard › can complete the product types section
TimeoutError: waiting for function failed: timeout 30000ms exceeded
1 | export const waitForElementCount = function ( page, domSelector, count ) {
> 2 | return page.waitForFunction(
| ^
3 | ( domSelector, count ) => {
4 | return document.querySelectorAll( domSelector ).length === count;
5 | },
Timeout or 404 errors while e2e signals that the existing build is broken. Run npm install && npm run clean && npm run build
to generate a fresh build. It should also be noted that some of our npm scripts also removes the current build, so it's a good practice to always run a build before running e2e tests.
Thu Dec 3 11:55:56 +08 2020 - Docker container is still being built
Thu Dec 3 11:56:06 +08 2020 - Docker container is still being built
Thu Dec 3 11:56:16 +08 2020 - Docker container is still being built
Thu Dec 3 11:56:26 +08 2020 - Docker container couldn't be built
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @woocommerce/e2e-environment@0.1.6 test:e2e: `bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js`
npm ERR! Exit status 1
Check your docker, is it running? While the script says Docker container is still being built
, it is not actually responsible for running docker; it's just waiting for an existing docker instance to respond. Run npm run docker:up
if it's not.
Add this to wp-config.php
:
define( 'WCPAY_DEV_MODE', true );
See https://docs.woocommerce.com/document/payments/testing/dev-mode.
To get the install timestamp (used in wc_admin_active_for()
in NoteTraits
for example) try this SQL:
SELECT * FROM wp_options WHERE option_name = 'woocommerce_admin_install_timestamp'
Delete the woocommerce_onboarding_profile
option:
DELETE FROM wp_options WHERE option_name = 'woocommerce_onboarding_profile'
localStorage.setItem( 'debug', 'wc-admin:tracks' );
and set Chrome's log level verbose to checked.
- SSH into Vagrant box (
vagrant ssh
) cd /srv/www/<WP_INSTANCE>/public_html/wp-content/plugins/woocommerce-admin
- Set up:
bin/install-wp-tests.sh wc-admin-tests root root
- Fast tests:
./vendor/bin/phpunit --group fast
- All tests:
./vendor/bin/phpunit
You might need tocomposer install
ifphpunit
doesn't exist.
Delete the option woocommerce_task_list_welcome_modal_dismissed
:
DELETE FROM wp_options WHERE option_name = 'woocommerce_task_list_welcome_modal_dismissed'
WooCommerce is an open source commerce platform built for WordPress and lovingly crafted by Automattic and the WooCommerce community 💜. Come and work with us!
Contribution
- Set up development environment
- Our Git Flow
- SCSS and JS minification
- Naming conventions
- CSS SASS coding guidelines and naming conventions
- Critical Flows
- API Critical Flows
- String localisation guidelines
- Translating WooCommerce
- Deprecation in core
- Adding Actions and Filters
- Common Issues
- Writing high-quality testing instructions
Release Notes
- Release Testing Instructions
- 3.6.x notes/FAQ
- 2.6.x to 3.0.0 Developer Migration Notes
- Select2 fields not working in 3.0.x
- Thumbnail Image Regeneration in 3.3+
- Customizing image sizes in 3.3+
REST API and CLI
CRUD & Data Descriptions
- Database Description
- CRUD Objects in 3.0
- Order and Order Line Item Data
- Coupon Data
- Customer Data
- Product Data
- Data Stores
Internal APIs
Theming
- Enabling product gallery features (zoom, swipe, lightbox)
- Template File Guidelines for Devs and Theme Authors
Examples / Guides