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

Fix archive page going on infinite loop in Astra theme #6431

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

Imran92
Copy link
Contributor

@Imran92 Imran92 commented Jan 25, 2023

Fixes #6391

Changes proposed in this Pull Request

  • Astra >= 4.0.0 tries to fetch some extra details on top, like the Archive Description on top of our archive page. The have_posts call after the_post() function here causes it go on an infinite loop. Adding a fix for Astra to not try to show the archive description on top of the Course archive page as it only happens when our Unsupported theme handling is being used.

Testing instructions

  • Install the latest Astra theme
  • Go to Sensei's course archive page from the frontend
  • Make sure it's fully loading and not going in an infinite loop

@Imran92 Imran92 requested a review from a team January 25, 2023 21:13
@Imran92 Imran92 self-assigned this Jan 25, 2023
@codecov
Copy link

codecov bot commented Jan 25, 2023

Codecov Report

Merging #6431 (3d41665) into trunk (4020a36) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              trunk    #6431   +/-   ##
=========================================
  Coverage     46.74%   46.74%           
  Complexity     9737     9737           
=========================================
  Files           464      464           
  Lines         34369    34370    +1     
  Branches        275      275           
=========================================
+ Hits          16066    16067    +1     
  Misses        18098    18098           
  Partials        205      205           
Impacted Files Coverage Δ
...ensei-unsupported-theme-handler-course-archive.php 78.12% <100.00%> (+0.70%) ⬆️

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 a5a2a73...3d41665. Read the comment docs.

Copy link
Member

@m1r0 m1r0 left a comment

Choose a reason for hiding this comment

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

Works as described. 👍

@Imran92 Imran92 merged commit 749b016 into trunk Jan 26, 2023
@Imran92 Imran92 deleted the fix/infinite-loop-on-astra branch January 26, 2023 12:50
@merkushin merkushin mentioned this pull request Jan 26, 2023
@donnapep donnapep added this to the 4.11 milestone Jan 27, 2023
@donnapep
Copy link
Collaborator

@Imran92 Is there an issue with the Astra theme that we should consider reporting to their team so that they can address it at the source?

@Imran92
Copy link
Contributor Author

Imran92 commented Jan 27, 2023

@Imran92 Is there an issue with the Astra theme that we should consider reporting to their team so that they can address it at the source?

Hi Donna 👋 I was thinking about this too, but it seemed Astra didn't have any issues with any other archives or custom types. The way we handle archive using theme handlers functions and render is a bit different as we override the archive query and render it as a post with different content, so it seemed a bit specific for our case. That's why I've only handled it from our end and didn't report it to Astra. Do you think we should still report it?

@donnapep
Copy link
Collaborator

Nope, that's fine. Just wanted to be sure that the bug was a side effect of something we were doing in Sensei. 🙂

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.

Astra stuck in infinite loop on Courses page
3 participants