Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#50421 closed defect (bug) (fixed)

Twenty Twenty: Author archive with no posts

Reported by: sgr33n's profile SGr33n Owned by: williampatton's profile williampatton
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.3
Component: Bundled Theme Keywords: has-screenshots has-patch commit
Focuses: template Cc:

Description

Hi,
The TwentyTwenty behavior for authors archive pages, where the author didn't publish any post, has probably a bug.
Where oldest themes, like twentyninteen had "nothing found" the new twentytwenty have a blank page with a title "Author:".

Thanks!

Attachments (7)

19.PNG (29.6 KB) - added by SGr33n 4 years ago.
TwentyNineteen
20.PNG (18.0 KB) - added by SGr33n 4 years ago.
TwentyTwenty
50421.diff (669 bytes) - added by rebasaurus 4 years ago.
Patch to fix 50421.
nothing-found.patch (2.1 KB) - added by SGr33n 4 years ago.
50421.2.diff (2.4 KB) - added by priyomukul 4 years ago.
Seems like there is no template-parts for nothings found like we have in Twenty Nineteen theme ( template-parts/content/content-none.php )
Avant.PNG (48.8 KB) - added by virginienacci 4 years ago.
Before patch bug on title
Après.PNG (51.7 KB) - added by virginienacci 4 years ago.
After patch : Nothing Found is displayed

Download all attachments as: .zip

Change History (22)

@SGr33n
4 years ago

TwentyNineteen

@SGr33n
4 years ago

TwentyTwenty

#1 @williampatton
4 years ago

  • Keywords has-screenshots added
  • Owner set to williampatton
  • Status changed from new to assigned

Hey @SGr33n, nice catch here - thank you for opening a ticket. I'll pick this one up and sort it this weekend. Should be a fairly easy one to solve I think :)

#2 @SGr33n
4 years ago

Yes, if you have time, othwerwise I could address this, no problem :)

#3 @williampatton
4 years ago

  • Milestone changed from Awaiting Review to 5.5

If you are able to make a patch for it please do go ahead. That would be super helpful :)

I can't get time for it till the weekend but I am certain it's a relatively simple fix so if you wanted to take care of it before then feel free.

I'll milestone it for 5.5 as I am pretty sure it can be shipped then.

#4 @SGr33n
4 years ago

Good! so hear you later.

#5 @ianbelanger
4 years ago

  • Summary changed from TwentyTwenty: Author archive with no posts to Twenty Twenty: Author archive with no posts
  • Version changed from trunk to 5.3

@rebasaurus
4 years ago

Patch to fix 50421.

#6 @rebasaurus
4 years ago

  • Keywords has-patch added; needs-patch removed

#7 @SGr33n
4 years ago

My patch, I replicated the twentynineteen behavior (search form below).
I also corrected the stable version in the readme.txt, I suppose it will became 1.5.

#8 @williampatton
4 years ago

wow 2 patches to pick from and both have solutions. That almost never happens! Will look these over as soon as I am able. Maybe @ianbelanger can look them over too since he will be the one we need to ask to do the commiting :)

@priyomukul
4 years ago

Seems like there is no template-parts for nothings found like we have in Twenty Nineteen theme ( template-parts/content/content-none.php )

#9 @Asif2BD
4 years ago

  • Keywords needs-testing added

@williampatton @ianbelanger now you get 3! Welcome to @priyomukul on his first patch!

@virginienacci
4 years ago

Before patch bug on title

@virginienacci
4 years ago

After patch : Nothing Found is displayed

#10 @virginienacci
4 years ago

  • Keywords needs-testing removed

Hi,

I tested the patch 50421.diff​ added by @rebasaurus

It replaces the title correctly.

Have a nice day

Virginie

Last edited 4 years ago by virginienacci (previous) (diff)

#11 @audrasjb
4 years ago

I tested all proposed changes as well, and 50421.diff is the only one to fix the issue in my testing. I think it would be a nice to have for 5.5 as the issue is easy to reproduce.

This ticket was mentioned in Slack in #core-themes by audrasjb. View the logs.


4 years ago

#13 @williampatton
4 years ago

  • Keywords commit added

Since @SGr33n was first to provide a patch here and it is the simplest of the options I think we should go with that one. It's also the only one that was able to be applied when @audrasjb tested.

I tested myself too and verified it works. I do think the other patches can be added though at a later point as enhancements to the behavior.

This first patch is ready to commit @ianbelanger :)

#14 @williampatton
4 years ago

Just updating here that I tagged the wrong person previous message. The original patch is provided by @rebasaurus and it is the one we will go for here.

Other patches can be sent through with additional tickets though as they seem like good enhancements. For this one I chose to go with the simplest patch and that is the first one.

#15 @whyisjake
4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 48355:

Bundled theme: Ensure appropriate title for author archives for that don't have posts.

Rather then displaying Author: , show Nothing Found.

Fixes #50421.

Props SGr33n, williampatton, ianbelanger, rebasaurus, priyomukul, virginienacci, audrasjb.

Note: See TracTickets for help on using tickets.