Discussion:
Strange post repetition issue
Bhuvnesh Joshi
2013-12-07 17:55:34 UTC
Permalink
Hi,

This is my first mail to WP community :)

I have been developing a website for a friend and I have encountered a
strange issue.

Their are many post which are repeating randomly on various page

example

http://scrollmore.com/category/fun/ (see fast and furious post)

and second page

http://scrollmore.com/category/fun/page/2/

it is repeating in the second page instead of showing next posts but their
is random post repetition in various pages.

Some single post repeat sometimes multiple posts repeats when we more to
older pages.

I am unable to find the issue behind this I have tried disabling all plugin
and even changing theme to default theme but it is still having the same
repeation issue.

I am certain that their is not error in theme because it used to work
correctly but suddenly it stopped working.

Can anybody guide me to direction where I can find solution to this or
debug this issue.

Regards
Nikola Nikolov
2013-12-07 18:09:29 UTC
Permalink
Well, I'd take a look at the $wp_query object. So in your template put some
code like this:

<?php
if ( isset( $_GET['testing'] ) {
// Should already be available, but let's make sure it is
global $wp_query;
var_dump( $wp_query );
} ?>

And take a look at the source code of the page. Look for the query
parameters - see if something doesn't seem right in there. Usually on a
category archive you should only have the category(or category name - can't
remember precisely) and optionally the page parameters - everything else is
more than likely not coming from the WordPress core code.
Post by Bhuvnesh Joshi
Hi,
This is my first mail to WP community :)
I have been developing a website for a friend and I have encountered a
strange issue.
Their are many post which are repeating randomly on various page
example
http://scrollmore.com/category/fun/ (see fast and furious post)
and second page
http://scrollmore.com/category/fun/page/2/
it is repeating in the second page instead of showing next posts but their
is random post repetition in various pages.
Some single post repeat sometimes multiple posts repeats when we more to
older pages.
I am unable to find the issue behind this I have tried disabling all plugin
and even changing theme to default theme but it is still having the same
repeation issue.
I am certain that their is not error in theme because it used to work
correctly but suddenly it stopped working.
Can anybody guide me to direction where I can find solution to this or
debug this issue.
Regards
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Chris Williams
2013-12-07 18:10:04 UTC
Permalink
This is really a support question, you should ask over on WP.org support
forums.

But the first question is to find out whether the posts are actually dupes
(are in the database like that) or is it a code problem.

Use PHPmySQL or some similar database tool and see if the posts are
actually duplicated in the database. If they are, then there is a problem
with posting. You're entering it several times? Posting multiple
versions? I don't know.

If they aren't in the database multiple times, then it's a display problem
That's likely code in your "loop". Or it could be the database server
spewing up multiples of the same record. In any case, that's more of a
PHP issue. There, I'd start with a good PHP debugger and step through the
loop and see if you are, in fact getting multiples of the same record each
time through the loop.
From there you can determine what's the problem. I hope.
Hi,
This is my first mail to WP community :)
I have been developing a website for a friend and I have encountered a
strange issue.
Their are many post which are repeating randomly on various page
example
http://scrollmore.com/category/fun/ (see fast and furious post)
and second page
http://scrollmore.com/category/fun/page/2/
it is repeating in the second page instead of showing next posts but their
is random post repetition in various pages.
Some single post repeat sometimes multiple posts repeats when we more to
older pages.
I am unable to find the issue behind this I have tried disabling all plugin
and even changing theme to default theme but it is still having the same
repeation issue.
I am certain that their is not error in theme because it used to work
correctly but suddenly it stopped working.
Can anybody guide me to direction where I can find solution to this or
debug this issue.
Regards
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Nikola Nikolov
2013-12-07 18:31:49 UTC
Permalink
From what I could gather, the duplicates were indeed the same post - at
least the mark-up was ending-up with the same ID(which I assume was
outputted with get_the_ID() ).

Also the search results for one of the posts brings-up only one result as
well...
This is really a support question, you should ask over on WP.org support
forums.
But the first question is to find out whether the posts are actually dupes
(are in the database like that) or is it a code problem.
Use PHPmySQL or some similar database tool and see if the posts are
actually duplicated in the database. If they are, then there is a problem
with posting. You're entering it several times? Posting multiple
versions? I don't know.
If they aren't in the database multiple times, then it's a display problem
That's likely code in your "loop". Or it could be the database server
spewing up multiples of the same record. In any case, that's more of a
PHP issue. There, I'd start with a good PHP debugger and step through the
loop and see if you are, in fact getting multiples of the same record each
time through the loop.
From there you can determine what's the problem. I hope.
Post by Bhuvnesh Joshi
Hi,
This is my first mail to WP community :)
I have been developing a website for a friend and I have encountered a
strange issue.
Their are many post which are repeating randomly on various page
example
http://scrollmore.com/category/fun/ (see fast and furious post)
and second page
http://scrollmore.com/category/fun/page/2/
it is repeating in the second page instead of showing next posts but their
is random post repetition in various pages.
Some single post repeat sometimes multiple posts repeats when we more to
older pages.
I am unable to find the issue behind this I have tried disabling all plugin
and even changing theme to default theme but it is still having the same
repeation issue.
I am certain that their is not error in theme because it used to work
correctly but suddenly it stopped working.
Can anybody guide me to direction where I can find solution to this or
debug this issue.
Regards
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Continue reading on narkive:
Loading...