Updating to PMPro courses 1.2.2 breaks existing links
Closed this issue · 3 comments
Describe the bug
Updating PMPro Courses to 1.2.2 causes existing lesson URLs to change. The lesson
post type slug is rewritten to pmpro_lesson
.
This can be problematic if you have previously shared lesson links or hardcoded them somewhere.
To Reproduce
Steps to reproduce the behavior:
- Install an older version of PMPro Courses eg. 1.2.1
- Create a course and add a lesson.
- Visit the course page and make note of the lesson URL.
- Update to PMPro Courses 1.2.2
- Visit the lesson URL from Step 3, observe 404
Expected behavior
Pre-existing lesson URLs still lead to the lesson page.
Isolating the problem (mark completed items with an [x]):
- I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
- This bug happens with a default WordPress theme active, or Memberlite.
- I can reproduce this bug consistently using the steps above.
WordPress Environment
To add a note here for others that may come across this issue, I had replicated it at one point but then it cleared itself.
It's worth trying the following:
- Deactivate (but do not delete) and re-activate the
pmpro-courses
plugin to flush rewrite rules. - Change modules (toggle between modules save and choose your previous module and save again).
Also deactivating the conflicting LMS plugin solves things, you should really only use one LMS plugin on a site that shares courses and lesson slugs.