#35356 closed defect (bug) (fixed)
wp_list_comments ignores $comments parameter
| Reported by: | felser | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | high | Milestone: | 4.4.2 |
| Component: | Comments | Version: | 4.6 |
| Severity: | normal | Keywords: | fixed-major |
| Cc: | Focuses: |
Description
Introduced in [36157].
This update does not check if a custom $comments array was provided before determining that a new comment query needs to be made.
If a comment array is provided, wp_list_comments shouldn't make a new query and should always use the provided comments.
Attachments (2)
Change History (9)
#1
@
11 years ago
- Keywords needs-patch added
- Milestone Awaiting Review → 4.4.2
- Owner set to
- Priority normal → high
- Status new → assigned
#2
follow-up:
↓ 3
@
11 years ago
- Keywords has-patch needs-testing added; needs-patch removed
Thanks for the patch, @ivankristianto. It's frustrating that the separate_comments() logic has to be reproduced, but like you, I can't see a better way of doing it without rewriting the whole function.
35356.diff cleans up the formatting of the patch, and adds a unit test that demonstrates the issue. @felser or someone else having the problem, can you verify that the patch fixes the issue for you?
#3
in reply to: ↑ 2
@
11 years ago
Replying to boonebgorges:
It's frustrating that the
separate_comments()logic has to be reproduced
Totally agree with you. It does repeated 3 times.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@felser Thanks for the ticket. You're correct that this is due to [36157] - it was an oversight on my part. It should just be a matter of moving the added logic inside the
elseblock right below it, but this will need unit tests.