#4897 closed enhancement (fixed)
Loading more activities after an update displays last activity in double
Reported by: | imath | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.8 | Priority: | low |
Severity: | minor | Version: | 1.7 |
Component: | Activity | Keywords: | has-patch needs-testing |
Cc: |
Description
Hi,
I hope, i'll succeed to explain this minor "issue" in english!!
Let's say, there's 21 activities in database. When i go on Activity directory, i have 20 activities displayed and the load more link.
Now imagine, i post a new activity, i have 21 activities displayed and the load more link.
Now if i click on the load more link, the activity just before the load more link will be displayed again, and we get the same id in double (for instance : #activity-20)
So i thought, the easiest way to avoid this, is to "remove from display" the activity just before the load more link in case of a new update.
You'll find the javascript enhancement in the diff attached to this ticket
Attachments (3)
Change History (12)
#1
@
12 years ago
- Milestone changed from Awaiting Review to Future Release
- Priority changed from normal to low
#3
follow-up:
↓ 4
@
12 years ago
- Keywords needs-refresh added; has-patch 2nd-opinion removed
- Milestone changed from Future Release to 1.8
imath; interested in getting this into 1.8?
The patch needs another look, if only because doing this is unsafe: :)
$qs[] = 'exclude=' . $_POST['exclude_just_posted']
#4
in reply to:
↑ 3
@
12 years ago
Replying to DJPaul:
imath; interested in getting this into 1.8?
Yes !! i'll check this tomorrow to make it safer ;)
#5
@
12 years ago
- Keywords has-patch added; needs-refresh removed
Just added 4897.02.diff (using wp_parse_id_list() to be sure ids are int)
#7
follow-up:
↓ 9
@
12 years ago
Great patch, imath. I've cleaned it up a bit, but the technique works well for me.
#8
@
12 years ago
- Owner set to boonebgorges
- Resolution set to fixed
- Status changed from new to closed
In 7116:
#9
in reply to:
↑ 7
@
12 years ago
Replying to boonebgorges:
Great patch, imath. I've cleaned it up a bit, but the technique works well for me.
Thanks @boone ;)
4987.01.diff seems to be better. I've noticed in a plugin i'm working on that if the order of the query changes then the previous method is not working well.