Page count in Full Sitemap very large
Permalink
Hi
A page count in a site has gone mental, its reading 4294967266 - see attached.
Can this be fixed/reset?
Thanks
A page count in a site has gone mental, its reading 4294967266 - see attached.
Can this be fixed/reset?
Thanks
Thanks mkly, I can reset the db record fine, but what is stopping it from calculating it wrong again?
I'm not sure. That looks like an unsigned integer that went below zero and wrapped around. Which basiclally means it became less than zero.
I made a quick change that will at least prevent the very large number and instead end decrementing at 0.
EDIT:https://github.com/concrete5/concrete5/pull/1338...
As to why this is happening in your setup, I'm not sure.
The method that decrements that number PageStatistics::decrementParents() gets called in Page::move(), Page::delete() and Page::removeAlias()
So if there is anything strage(maybe page events) that may be happening to get in the way of that, I would look there.
Best Wishes,
Mike
I made a quick change that will at least prevent the very large number and instead end decrementing at 0.
EDIT:https://github.com/concrete5/concrete5/pull/1338...
As to why this is happening in your setup, I'm not sure.
The method that decrements that number PageStatistics::decrementParents() gets called in Page::move(), Page::delete() and Page::removeAlias()
So if there is anything strage(maybe page events) that may be happening to get in the way of that, I would look there.
Best Wishes,
Mike
Thanks mkly, I reset the number of cChildren to the real number, in the hope that the + and - functions will just take care of the rest.
Thanks.
Thanks.
It is kept in the database in the Pages table as cChildren.
You can reset this either with a db query or create a tools file like the one below and browse to it like
With the code(you will need to edit this for your site) and save it to the root tools/ directory
/tools/reset_count.php
As always please back up your database beforehand and this code comes with no warranty but with best intentions.
Best Wishes,
Mike