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 for "Page not found" on categories with hierarchical header and < 5 posts #1270

Merged
merged 2 commits into from
Aug 23, 2016

Conversation

benlk
Copy link
Collaborator

@benlk benlk commented Aug 22, 2016

Changes

  • If the category has posts in the featured header, do not output partials/content-not-found.php if there are n < 6 posts in the category and the featured header is displayed.
  • In that partial, don't output Page Not Found if it's not a 404. Examples of where this situation may occur:
    • index.php
    • archive.php and category.php if no posts match the query
    • partials/home-post-list.php

Using the same site as the original screenshot in #898 for these screenshots.

This is why the changes to partials/content-not-found.php:

screen shot 2016-08-21 at 9 32 30 pm

After those changes:

screen shot 2016-08-21 at 9 49 55 pm

A 404 in this PR; nothing's changed:

screen shot 2016-08-21 at 9 49 44 pm

@rclations
Copy link

looks good to me - do we want to merge this into master or develop?

@aschweigert aschweigert added this to the hotfix milestone Aug 22, 2016
@aschweigert
Copy link

this can go directly to master as a hotfix

@benlk
Copy link
Collaborator Author

benlk commented Aug 23, 2016

The failing test on this PR is largo_fb_user_is_followable, and it's failing because someone created a Facebook account with the username abcdefghijklmnopqrstuvwxyz12. This has been fixed with a more-random username in the develop branch.

@aschweigert aschweigert merged commit b1a33f0 into master Aug 23, 2016
@aschweigert aschweigert deleted the 898-nothing-found-category.php-master-rebase branch August 23, 2016 20:09
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.

3 participants