Automattic / sensei

Sensei LMS - Online Courses, Quizzes, & Learning
https://senseilms.com
GNU General Public License v2.0
525 stars 195 forks source link

Lesson infinitely updates when the Blocks CSS Plugin is used with Sensei #7598

Open markcummins opened 3 months ago

markcummins commented 3 months ago

Note: this seems to be the same issue as #7109.

Steps to Reproduce

  1. Install Sensei and Blocks CSS Plugins (https://wordpress.org/plugins/blocks-css/)
  2. Create a lesson and a quiz with at least one question and publish it.

What I Expected

The lesson should get published

What Happened Instead

The lesson continously tries to update. Every time it saves, it updates again.

PHP / WordPress / Sensei LMS version

PHP Version: 8.2.7 WordPress: 6.5.2 Sensei: 4.23.1 Blocks CSS: 2.6.10

Browser / OS version

Chrome: 124.0.6367.78

Screenshot / Video

sensei reloading

Context / Source

The issue seems to be in this file sensei-lms/assets/dist/blocks/quiz/index.js

merkushin commented 2 months ago

Reproduced with WordPress 6.5.3, Sensei LMS 4.24.0, Course 1.3.7, Blocks CSS 2.6.12.

I suppose it is related to a call to REST API to save the quiz. We probably clear out some changes from the quiz or questions that were added by Blocks CSS. The difference between content sent and received usually leads to the infinite loop.