Unit will get stuck in either "draft" or "published" mode

Description

Re: Bug 627.

While working with a course for HarvardX, they noted strange behavior where certain units would get stuck in "draft" mode. In other words, the user would hit publish and though the content would publish, the studio side still said there was a saved draft. Exporting the course and importing into Edge didn't replicate the problem as once on edge the same draft would be published and the UI would change. Re-importing did not solve the issue. We used 's thoughts from Bug 627 about multiple people editing at once and managed to not only reproduce the bug, but also produce its counterpart which is equally as important. We also discovered it's not just multiple people editing at once, but multiple tabs opened at the same time by the same user would cause the same problem.

Issue #1: Instructor edits a page and hits publish. Content is saved on live, but Studio still shows "Draft"
Issue #2: Instructor edits a page and is not able to hit publish or discard changes (buttons grayed out). Content in studio now does not match live because Studio still shows the "draft" but doesn't allow publishing.

Steps to Reproduce

Note: You can replace Person1 with Tab1 to recreate the steps as one person.

Getting Stuck in "Published" Mode:
1. Create a unit with any component and hit publish. Person1 and Person2 open their page to this unit.
2. Person1 makes a change to a component and hits save. They do not publish.
3. Person2 opens up the unit which is in draft mode now and hits the edit button on the same component. They should see the change made by Person1.
4. Person2 makes a new change and publishes.
5. Person1 decides to discard changes.
Unit is now stuck in "published" mode with buttons greyed out and mismatching studio/LMS

Getting Stuck in "Draft" Mode:
1. Create a unit with any component and hit publish. Person1 opens their page to this unit.
2. Person1 makes a change to a component and hits save. They do not publish.
3. Person2 opens up the unit which is in draft mode now and hits the edit button on the same component. They should see the change made by Person1.
4. Person2 makes a new change and does not publish either.
5. Person1 decides to discard changes.
6. Person 2 hits publish after Person1 discards changes
Unit is now stuck in "draft" mode which means that Studio will always say this unit is a draft even though hitting publish DOES actually publish content.

Extra Bonus Step (just discovered): If you hit "Discard Changes" after you get stuck in "Draft" mode, then it gets stuck in "published" mode.

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Assignee

hrazaR

Reporter

Luis Duarte

Labels

Reach

None

Impact

None

Platform Area

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Priority

CAT-2
Configure