sensei icon indicating copy to clipboard operation
sensei copied to clipboard

[Editor] Course Editor is not accepting changes when there are two lessons with the same name

Open gabrielcaires opened this issue 3 years ago • 0 comments

Extra context

Today is possible to have 2 lessons with the same name, but the editor is doing weird behavior, displaying unexpected errors, and crashing the browser.

Steps to Reproduce - Scenario:

  1. Create a course
  2. Publish with the default Lessons
  3. Rename Lesson 2 to `Lesson 1'
  4. Check that now both lesson instances are updated at the same time
  5. Try to remove one of the duplicated courses - Bug 1
  6. Try to rename one of the duplicated lessons - Bug 2
  7. Try to move one of the duplicate lessons to the first lesson - Bug 3

What I Expected

Regardless of the lesson name, both lessons should be handled as different lessons.

What Happened Instead

Bug 1, Bug 2: Once we have two lessons with the same name, the editor is always assuming that they are the same, and it is blocking the user to edit or remove the lessons individually

Bug 3: When the user tries to move a duplicated lesson, the browser is crashing, probably due to some infinite loop.

PHP / WordPress / Sensei LMS version

7.3 / 6.0.1 / 4.6.3

Screenshot / Video

https://user-images.githubusercontent.com/38718/192343081-f74e0448-ca49-41d8-8614-3aedc60dbccb.mov

Thread:

p1663766571934379-slack-C02P7FHLVR9

gabrielcaires avatar Sep 26 '22 17:09 gabrielcaires