Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensei lessons unprotected for not enrolled users when Yoast is activated #5001

Closed
NaiiCostura opened this issue Apr 8, 2022 · 16 comments
Closed

Comments

@NaiiCostura
Copy link

Hi I have just intalled Sensei Pro and it is not working.
I tried:
1- Enabling just the learn mode: I can not edit or watch the divi lessons, they show the html.
2- Enabling the learn mode and the theme style: all lessons are unprotected, anybody can watch the videos
I upload a video here: https://drive.google.com/file/d/1_Pa5tlRlUBAjhvp3YaT-oZRlJ7B5Id3S/view?usp=sharing

But then, I restored my backup to use the version 3.14 that was working before and now the Sensei is crazy. The Sensei LMS shows inactivated, and if I activate it will show the menu of the version Pro with the same problems.
And now I don´t know what to do :-
sensei divi1
sensei divi2
sensei lms desactivado
(

@dadish
Copy link
Contributor

dadish commented Apr 11, 2022

Confirmed. The Learning Mode with Divi theme does not work properly, atm. This issue should not be related to Sensei Pro.

@NaiiCostura Please confirm that the issue with cryptic/crazy content is gone for you when you turn off Learning Mode in Sensei LMS > Settings > Course and for course itself in the Course editor settings.

@NaiiCostura
Copy link
Author

With the learning mode on and theme style off: I can´t edit or watch the divi lessons
learning-mode-on
e

@NaiiCostura
Copy link
Author

With the learning mode and theme style on: I can´t edit the divi lessons but anybody on the internet can watch the video.
learnin-mode-and-theme-on

@NaiiCostura
Copy link
Author

And with the learning mode and the theme style off: I can edit the divi lessons and also anybody on the internet can watch the video, they are unprotected.
learnnin-mode-of

@dadish
Copy link
Contributor

dadish commented Apr 11, 2022

@NaiiCostura You should turn the Learning Mode off for now. The Learning Mode has some issue when used with Divi theme. It will be fixed soon.

@NaiiCostura
Copy link
Author

NaiiCostura commented Apr 11, 2022

But if I turn the learning mode off I can edit the lessons and also anybody can watch the lesson :-( . None of the options above works.

@dadish
Copy link
Contributor

dadish commented Apr 11, 2022

@NaiiCostura Could you please confirm that you also turned off the Learning Mode in the course editor settings.

Screen Shot 2022-04-11 at 17 44 53

@NaiiCostura
Copy link
Author

NaiiCostura commented Apr 11, 2022

With the learning mode off on both course and course itself, I can edit divi and the video is protected. I will keep this for now, thanks
learnin-mode-off-course

@renatho renatho self-assigned this Apr 25, 2022
@renatho
Copy link
Contributor

renatho commented Apr 26, 2022

Hi @NaiiCostura!

all lessons are unprotected

I'm not able to reproduce this. Is it still happening for you? If yes, could you inform us the following versions you have installed?

  • WordPress
  • Divi
  • Sensei Pro and Sensei LMS (If you're using the bundled version from woocommerce.com they'll be installed together) - You can check the versions in the plugins page.

If they aren't in the last versions, could you try to update them?

Also, notice that you need to access the lessons logged in as a student to test (admin users are allowed to see all the content). 😉

they show the html

About this, it's expected because you're using Divi builder. In order to load the Divi builder features, you need to activate "Enable theme styles" setting as you already tried in your tests.

@NaiiCostura
Copy link
Author

NaiiCostura commented Apr 27, 2022

Hi Renatho,
Unfortunately is still the same after updating all plugins. And also, I didn´t log as student or admin, I tried as someone new to my web looking at the courses and lessons. Here the screenshots of all three options ( to keep my videos safe, the only option is turning off the learn mode an theme style) :
1-on learnmode-on theme
2-on learn mode-off theme
3-off learn mode-off theme
divi child
divi
sensei pro
wordpress

@renatho
Copy link
Contributor

renatho commented Apr 28, 2022

Thank you for the details, @NaiiCostura!

Would it be possible to make a new test on your env? Using the Divi theme directly instead of the Divi Child, and disabling all the plugins but Sensei LMS and Sensei Pro? If it fixes the issue, we can identify the origin of the problem. 🤞

If not, could you create a staging site and contact Sensei Pro support referencing this issue?

@NaiiCostura
Copy link
Author

I´ve done what you asked me (disabling all plugins except Sensei) and with both Divi and Divi Child the lessons are protected. Then I started enabling each one of my plugins and they were all ok (the learning mode works and the lessons are protected) except with Yoast SEO. I upload a quick video showing it: https://bit.ly/3vKyGdSRENATHO
So the Yoast SEO plugin is causing the the problem i think, in this case what can I do?
do you still need the staging site?

@renatho
Copy link
Contributor

renatho commented Apr 29, 2022

@NaiiCostura Interesting! It's already good progress! But unfortunately, I can't reproduce it yet, even with Yoast 18.6.

Recently we fixed an issue with Yoast: #5044, but your issue doesn't seem related to that. And I also tried to simulate it with the release you have installed (without this recent fix), and I couldn't reproduce it too.

I think it would be nice to create the staging site and send it through the Sensei Pro support, so we can try to debug it directly on your site to understand what is happening.

@renatho renatho changed the title Sensei Pro not working with Divi lessons Sensei lessons unprotected for not enrolled users when Yoast is activated Apr 29, 2022
@NaiiCostura
Copy link
Author

Hi Renatho, I´ve already created the staging site an sent it through the support.

@gaurav1984
Copy link

Also reported in 5231411-zen

@renatho
Copy link
Contributor

renatho commented Jul 8, 2022

Hey folks!

This issue seems to be something caused by external things. We found 2 options to fix it:

Option 1) If you set an excerpt (lesson editor sidebar in the panel "Excerpt") to your lesson, it fixes the issue for that specific lesson.

Option 2) If you don't use the excerpt of the lessons at all, you can use this snippet to remove it completely, also fixing the issue for all the lessons:

// Remove excerpt for lesson only.
function remove_lesson_excerpt( $excerpt, $post ) {
	if ( 'lesson' === $post->post_type ) {
		return '';
	}
	
	return $excerpt;
}
add_filter('get_the_excerpt', 'remove_lesson_excerpt', 99, 2);

So I'm closing this issue for now. If this solution is not enough for a specific scenario, feel free to bring it to us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants