lifterlms
lifterlms copied to clipboard
Launching Course Builder after clicking Add Course results in Auto Draft course that disappears
Reproduction Steps
- Click Courses > Add Course
- Click Launch Course Builder
- Observe title "Auto Draft", add a Section and Lessons, and edit the Title to "Testing Edit" and add a section
- Click Save Changes
- Return to Courses listing
Expected Behavior
Course is shown is the course listing, and can be edited.
Actual Behavior
Course is not shown in the course listing and disappears.
Error Messages / Logs
No error messages are shown during the reproduction steps, so the user doesn't realize there's a problem until their course is not able to be found.
- Include any relevant error messages or log files
<!-- Paste error logs / backtraces below this line -->
This issue has be recreated:
- [x] Locally
- [x] On a staging site
- [x] On a production website
- [x] With only LifterLMS and a default theme
At some point an actual draft of the auto draft needs to be saved. Perhaps when the course builder is launched, if it's an auto draft, the course can be saved as an actual draft behind the scenes.
Was supposed to be fixed in 7.6.0, but it seems to still be showing Auto Draft on initial load of the course builder. Going back then going back into the course builder shows New Course as expected.
The issue is the global $post
wasn't reloaded after changing the course title to New Course. PR to fix #2642