[wp-testers] incorrect post counts

]V[orlock Zernebock morlockz at gmail.com
Sun Feb 10 00:36:31 GMT 2008


Yeah, it works now. Good work dude!!

2008/2/9, Ryan Boren <ryan at boren.nu>:
>
> On Thu, Feb 7, 2008 at 1:47 PM, Lloyd Budd <lloydomattic at gmail.com> wrote:
> > On Feb 7, 2008 1:34 PM, ]V[orlock Zernebock <morlockz at gmail.com> wrote:
> >  > When I run the query directly in MySQL I got the correct number. All
> my old
> >  > published posts are with that status in MySQL.
> >  >
> >  > Here you have the results to compare against dashboard numbers:
> >  >
> >  > You have 1 posts, 12 pages, 1 draft, contained within 35 categories
> and 1
> >  > tags.
> >
> >  Interesting results. As those 1s are the first digit in the #...
> >  leaves me wondering. So the next step would be to add debug to the
> >  wp-admin/index.php to see that variables are being assigned the right
> >  value. If they are are, could it be number_format_i18n function? That
> >  is where I would look next.
>
> Fixed.  wp_count_posts() returns 1481, for example.
> number_format_i18n() converts this to 1,481.  1,481 is not an integer
> because of the comma, so passing it to sprintf with a %d format casts
> it to 1.  Changing to %s fixes it.
>
> Ryan
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>


More information about the wp-testers mailing list