Automattic / sensei

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

Numerous console errors and warnings in the editor #7624

Open donnapep opened 4 months ago

donnapep commented 4 months ago

Steps to Reproduce

  1. Install the WordPress Beta Tester plugin.
  2. Switch to the bleeding edge nightly.
  3. Open a course in the editor.
  4. There are errors / warnings in the console.
  5. Open a lesson in the editor.
  6. There are errors / warnings in the console.

What I Expected

No WordPress deprecation or block validation messages.

What Happened Instead

Several WordPress deprecation / block validation messages.

Screenshot / Video

Course

Screenshot 2024-07-03 at 3 00 33 PM

Lesson

Screenshot 2024-07-03 at 3 01 52 PM

Question

Screenshot 2024-07-03 at 3 04 15 PM

Context / Source

The tweet mentioned deprecations for WordPress 5.9, but I didn't come across any of those. We should click through other pages to see if we can find them: https://x.com/carolinapoena/status/1806837840031928323?s=46&t=tLqu-4WGyvBs1cDTKpVGSg

azollafox commented 3 months ago

I believe this is the same issue we have a user report for, and I see on my demo site. If you head to wp-admin> Appearance> Editor> Template>sensei-course-theme and click on either option, all blocks there will display Your site doesn't include support for the "sensei-lms/ui" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.

image

The errors I see in the browser Console on that page match what's reported here

The user and I are both on WordPress version: 6.6. I'm on the theme "Course" and the user is on Twenty Twenty-Four. The user report is in 8505410-zd

github-actions[bot] commented 3 months ago

Support References

This comment is automatically generated. Please do not edit it.

renatho commented 3 months ago

I fixed most of the issues in the course/lesson/question editor with this PR: https://github.com/Automattic/sensei/pull/7646. The items not fixed that I also documented in the PR are:

  • When navigating to the course editor, and navigating back (browser history), it gives the error Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load.. I could isolate it noticing that the warning is not displayed anymore when we remove the TextControl from the modal.
    • I didn't invest much time into that because it's external and not too critical.
  • https://github.com/Automattic/wp-calypso/issues/93167 - When using the tour, there is a warning about a deprecated prop (isElevated), which comes from Calypso.

We also have some warnings in the template editor and on the pages "Courses" and "My Courses".

That said, I'm not closing this issue yet.

renatho commented 3 months ago

I believe this is the same issue we have a user report for, and I see on my demo site. If you head to wp-admin> Appearance> Editor> Template>sensei-course-theme and click on either option, all blocks there will display Your site doesn't include support for the "sensei-lms/ui" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.

The errors I see in the browser Console on that page match what's reported here

The user and I are both on WordPress version: 6.6. I'm on the theme "Course" and the user is on Twenty Twenty-Four. The user report is in 8505410-zd

Hi @azollafox!

I tried it on a fresh site, but I couldn't reproduce the issue. Maybe you have some other plugins installed that could be conflicting somehow?

Are you able to reproduct it in a site creating it from scratch? If so, could you list the steps for us?

From my side, what I tried:

renatho commented 2 months ago

Moved back to "To do" to keep it open for the other issues reported in the comment: https://github.com/Automattic/sensei/issues/7624#issuecomment-2261518634

donnapep commented 1 week ago

The issue reported here is being tracked in https://github.com/Automattic/sensei/issues/7685.