In this post I will talk about how you can avoid common problems and how to collect data to help us solve a problem together.

If you think you found a bug, make sure to report it under Bug Reports.

Debugging is King

The first thing to do, when something doesn’t work, is start debugging. By default the Plugin will be silent when an error happens, to change this behaviour you can set the following constants in your wp-config.php.

Basically everything described under Debugging in WordPress applies to this Plugin as well.

// enable debugging (php) for everything
define( 'WP_DEBUG', true );

// only enable debugging for this plugin
define( 'SFW_DEBUG', true );
// enables extended debugging but can be heavy. 
// define( 'SFW_DEBUG', 2 );

// enables debugging in javascript
// also includes the original scripts instead 
// of minified versions 
define( 'SCRIPT_DEBUG', true );

// enables debug log, usually located 
// under wp-content/debug.log
define( 'WP_DEBUG_LOG', true );

Using the debug log is the best way to find problems with requests that do not directly create any output, like API calls.

Debugging the Synchronization Screen

If the Synchronization fails, please make sure to set the SCRIPT_DEBUG constant. This will enable debugging to the browser console. Just open the developer tools of your browser and switch to the console tab before starting a Synchronization. The executed and failed tasks will be logged in detail.

If you decide to report the problem, please save the console log and append it to your request. In Chrome, do so by right-clicking on the console window and hit “Save as…” to save a .log file.

404 Errors

If you experience errors of type 404, this is often caused by a change in the link structure.

Possible Solution

Go to Settings -> Permalinks and hit save. This triggers a flush of all rewrite rules.