Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Sensei: Critical Error when Sensei Pro and Sensei Interactive Blocks are Simultaneously Activated #74493

Open masperber opened 1 year ago

masperber commented 1 year ago

Quick summary

If Sensei Pro is installed and activated on a site where Sensei Interactive Blocks is installed, the site will crash with a critical error.

Although Sensei Pro includes all of the features of Sensei Interactive Blocks, attempting to install Sensei Pro while Sensei Interactive Blocks is installed shouldn't crash the site with a critical error.

Steps to reproduce

  1. Create a test site.
  2. Install and activate Sensei LMS.
  3. Install and activate Sensei Interactive Blocks.
  4. Install and activate Sensei Pro.

What you expected to happen

A critical error shouldn't occur. A better solution would be to deactivate Sensei Interactive Blocks when Sensei Pro is purchased, prior to install.

What actually happened

The site crashed with a critical error.

Impact

All

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

Atomic

Logs or notes

No response

kavyagokul commented 1 year ago

📌 SCRUBBING : RESULT

📌 FINDINGS/SCREENSHOTS/VIDEO

📌 ACTIONS

📌 Message to Author

tanjoymor commented 1 year ago

Reopening this bug as it is still occurring. The issue is with "Sensei Pro" not "Sensei Pro (WC Paid Courses)". Here is a recording showing the process:

https://user-images.githubusercontent.com/42655541/229305972-5d6c55f7-e2b3-45a5-bbf9-954cee9693b9.mp4

This is on a pre-existing site with the Business plan that went Atomic 2019-04-19.

cuemarie commented 1 year ago

📌 SCRUBBING : RESULT - Replicated / Could Not Replicate / Uncertain

📌 FINDINGS/SCREENSHOTS/VIDEO

Fatal error: Cannot declare class Sensei_Pro_Setup\Setup_Context, because the name is already in use in /wordpress/plugins/sensei-pro/1.13.0/modules/sensei-pro-setup/class-setup-context.php on line 14

Deactivating either Sensei Interactive Blocks or Sensei Pro removes the critical error warning, pointing to that combination as the conflict.

📌 ACTIONS

📌 Message to Devs

cpapazoglou commented 1 year ago

Just pinged the sensei-on-dotcom team in Slack.

aaronfc commented 1 year ago

I have mentioned the issue in #sensei-janitorial slack channel. Hopefully they will be able to look at this soon.

Imran92 commented 1 year ago

I've checked this a bit and it looks like the expected behavior here is if there is more than one of the plugins among Sensei Pro (WC Paid Courses), Sensei Pro, and Sensei Interactive Blocks are installed, only one of them should be enabled at a time.

There is code in place to enforce the aforementioned behavior, that only one is allowed to be activated. But for some reason it's not enforcing it. I've added this issue to our Janitorial board and we'll look into why that's happening.

Thanks!

cuemarie commented 1 year ago

Hi @donnapep & @Imran92 , I see this is now off the Sensei Janitorial board. Any updates or recommendations regarding the critical error that happens here?

donnapep commented 1 year ago

@cuemarie Looks like this was removed in error. I've added it back.

inaikem commented 1 month ago

Impact should be "Some (< 50%)". Setting priority to "Low".

Cc : @candy02058912