Automattic / Automattic/jetpack

Sync: Occasionally Sync doesn’t seem to work properly when switching themes

Open
#13,447 1 comment 0 reactions 0 assignees View on GitHub
[Package] Sync [Pri] Low [Status] Stale Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

Occasionally, Sync doesn’t seem to call all of the required sync actions when a theme is activated.

#### Steps to reproduce the issue
1. Use a sandboxed Jetpack site and a tool to observe the Sync calls.

2. Activate different themes and watch the sync calls. Typically at least 3 sync actions occur when the theme is changed.

3. Observe that occasionally only one sync action occurs. When this happens, it looks like the missing sync actions are:
* updated_option (for the stylesheet)
* jetpack_sync_current_theme_support

4. Also look at the Log Events in the site’s blog rc for odd events. Interestingly, the active theme shown in blog rc always updates correctly in my tests. The log events are not always correct.

#### What I expected
The sync actions should happen every time the theme is changed.

#### What happened instead
Occasionally, it looks like sync actions don't occur as expected.

**Screenshot - Log Events**

The screenshot below shows unusual behavior in the first two rows. The log doesn’t show an event where OceanWP was switched to Twenty Seventeen, but obviously that must have happened.

![Screen Shot on 2019-09-06 at 15-26-30](https://user-images.githubusercontent.com/50059399/64455319-685e8f00-d0bb-11e9-9deb-925ae5a28608.png)

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Reproduce on a sandboxed Jetpack site while observing Sync calls during theme activation; compare the expected updated_option and jetpack_sync_current_theme_support actions with Log Events. Done means all required actions and log events are consistently emitted for each theme change.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.