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

Learning Mode - Do not filter templates for query slugs if it is indexing. #5460

Merged
merged 2 commits into from
Aug 16, 2022

Conversation

dadish
Copy link
Contributor

@dadish dadish commented Aug 15, 2022

Fixes #5311

Changes proposed in this Pull Request

  • Checks if the query slugs are for indexing before filtering the templates.

Testing instructions

Without a bock-based theme:

  1. Activate Twenty Twenty-One theme (not block-based theme).
  2. Go to WP Admin > Appearance > Editor.
  3. Confirm the FSE works and you can customize the Learning Mode template.

With a bock-based theme, but with the theme styles disabled:

  1. Activate Twenty Twenty-Two theme (block-based theme).
  2. Go to WP Admin > Sensei LMS > Settings > Courses.
  3. Disable the option "Enable theme styles".
  4. Go to WP Admin > Appearance > Editor > Browse all templates (this option appears when expanding the "Home >" in the top bar).
  5. Click on "Lesson (Learning Mode)".
  6. Confirm the FSE works and you can customize the Learning Mode template.

For Post Type

  • Edit regular post.
  • Confirm that it does not have "Learning Mode (Lesson)" template for FSE editing.

@dadish dadish self-assigned this Aug 15, 2022
@dadish dadish requested a review from a team August 15, 2022 16:16
@codecov
Copy link

codecov bot commented Aug 15, 2022

Codecov Report

Merging #5460 (c6af0b3) into trunk (16a2937) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##              trunk    #5460      +/-   ##
============================================
- Coverage     44.54%   44.53%   -0.01%     
- Complexity     8749     8753       +4     
============================================
  Files           412      412              
  Lines         31166    31166              
  Branches        234      234              
============================================
- Hits          13882    13881       -1     
- Misses        17111    17112       +1     
  Partials        173      173              
Impacted Files Coverage Δ
...urse-theme/class-sensei-course-theme-templates.php 0.00% <0.00%> (ø)
includes/class-sensei-quiz.php 59.04% <0.00%> (-0.14%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 428bdb2...c6af0b3. Read the comment docs.

Copy link
Contributor

@yscik yscik left a comment

Choose a reason for hiding this comment

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

Works good! I added another check, there were warnings in the other filter when using a block theme.

@dadish dadish merged commit 3936be6 into trunk Aug 16, 2022
@dadish dadish deleted the fix/learning-mode-fse branch August 16, 2022 10:05
@gikaragia gikaragia added this to the 4.6.2 milestone Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error editing Learning Mode templates
3 participants