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

Ensure the content filter for course content is re-added in Learning Mode #5086

Merged
merged 1 commit into from
Apr 29, 2022

Conversation

alexsanford
Copy link
Contributor

Fixes https://github.com/Automattic/evergreen/issues/148

Changes proposed in this Pull Request

When rendering course content in learning mode, ensure the the_content filter is re-added after being temporarily removed. Otherwise, if the_content is called early, the filter is removed and some content may not show up on the frontend.

Testing instructions

One way to see this is by following the steps below. This is an incompatibility with a specific plugin, but it's possible that this could be showing up in other places as well.

  • Install the "Rank Math SEO" plugin.
  • Create a course with a lesson and a quiz. Enable Learning Mode.
  • In Sensei Settings > Courses, ensure the setting "Enable theme styles" is checked and saved.
  • Enrol in the course and view the quiz. Without the change from this PR, the quiz questions do not display (Rank Math SEO does something earlier which calls the_content). With this change, the quiz is rendered properly.

@alexsanford alexsanford requested review from yscik and a team April 29, 2022 15:50
@alexsanford alexsanford self-assigned this Apr 29, 2022
@renatho
Copy link
Contributor

renatho commented Apr 29, 2022

I couldn't reproduce the original issue with Rank Math SEO activated, but the change looks good to me, and it continues working to me.

I'd just suggest changing the target branch to feature/post-code-freeze because of the code freeze.

@alexsanford alexsanford changed the base branch from trunk to feature/post-code-freeze April 29, 2022 18:25
@alexsanford
Copy link
Contributor Author

Base is updated 👍

We've also tested and confirmed that this fixes the problem on the sites where we were originally seeing this bug.

Copy link
Contributor

@renatho renatho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@alexsanford alexsanford merged commit c134b83 into feature/post-code-freeze Apr 29, 2022
@alexsanford alexsanford deleted the fix/content-filter-removal branch April 29, 2022 19:48
@m1r0 m1r0 added this to the 4.4.1 - Report improvements milestone May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants