WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#22484 closed defect (bug) (invalid)

Sticky posts show twice with beta 3

Reported by: jetonr Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

I have the same template comparing against stable Version 3.4.2 and the wp 3.5 beta 3, the posts are appearing twice when they are sticky posts using query_posts!

Change History (11)

comment:1 @SergeyBiryukov3 years ago

  • Version set to trunk

Could you provide some code to reproduce the issue?

comment:2 @nacin3 years ago

  • Keywords reporter-feedback added

comment:3 @jetonr3 years ago

What I did is I published 3 posts posts, set one to siticky, changed the reading preference to show 1 post per page! What I have is the sticky showing on the first page with latest post and than again on the second page again! This was tested on 3.5 beta 3 with no plugins added and default theme twentytwelve !

Version 0, edited 3 years ago by jetonr (next)

comment:4 follow-up: @nacin3 years ago

Could you provide some code to reproduce the issue?

comment:5 @SergeyBiryukov3 years ago

Could not reproduce in 3.5 beta 3 using the steps from comment:3.

the posts are appearing twice when they are sticky posts using query_posts!

What does your query_posts() call look like?

comment:6 in reply to: ↑ 4 @jetonr3 years ago

Well the query posts looks like this on my template

query_posts($query_string);

but this is not important because the same things happens with all themes I have tried! I am testing on localhost with
Apache 2.4.3
MySQL 5.5.27
PHP 5.4.7

also forgot to mention I have also tested this on fresh install (clean db )

comment:7 @nacin3 years ago

also forgot to mention I have also tested this on fresh install (clean db )

I'm glad you have, but we can't, because you're not providing us any helpful information. Please share your template.

comment:8 @dd323 years ago

This sounds like the expected behaviour.

The problem as described in comment3 is as follows:

Page1:
-Post2 (sticky)
-Post1
Page2:
-Post2
Page3:
-Post3

Sticky posts are "repeated" within archives, they are not excluded from the archives automatically (although a template can choose to do so). This would also be the behaviour since sticky posts were introduced.,

comment:9 @nacin3 years ago

dd32 pointed out to me that your report is not clear: Is this a problem for you in 3.4.2 AND 3.5, or just 3.5?

comment:10 @jetonr3 years ago

dd32 If that is default behavior of sticky posts than please delete this thread completely!
My assumption was that they don't repeat in index/home page when is paginated!

comment:11 @helenyhou3 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version trunk deleted
Note: See TracTickets for help on using tickets.