Jump to content
WebFlake
  • 0

[4.6] System Error: Recounting Posts


BlackShot

Question

SELECT COUNT(*) FROM `forums_posts` WHERE archive_author_id=2 AND 1=0
IPS\Db\Exception: Unknown column 'archive_author_id' in 'where clause' (1054)
#0 public_html/home/system/Db/Select.php(383): IPS\_Db->preparedQuery('/*u152741989_u...', Array, true)
#1 public_html/home/system/Db/Select.php(441): IPS\Db\_Select->runQuery()
#2 public_html/home/system/Db/Select.php(365): IPS\Db\_Select->rewind()
#3 public_html/home/applications/forums/sources/Topic/ArchivedPost.php(126): IPS\Db\_Select->first()
#4 public_html/home/system/Member/Member.php(3814): IPS\forums\Topic\_ArchivedPost::memberPostCount(Object(IPS\Member))
#5 public_html/home/applications/core/modules/admin/members/members.php(3141): IPS\_Member->recountContent()
#6 public_html/home/system/Dispatcher/Controller.php(90): IPS\core\modules\admin\members\_members->recountContent()
#7 public_html/home/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute()
#8 public_html/home/admin/index.php(13): IPS\_Dispatcher->run()
#9 {main}

Does anybody know how to solve that error? I can't use the Recount tool available for each member in ACP.

I really can't see "archive_author_id" in "forum_posts". The only column similar to that is "author_id". I tried renaming it but it only broke more things.

BTW: I'm on 4.6 and I had converted all tables to InnoDB like Invision suggested in the ACP.

Edited by BlackShot
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 3

Apparently everybody else is having the same issue. IPS has probably broken it when they added a new similar recount option under Badges/Settings.

To fix it:

Look for ArchivedPost.php in yourforum > applications > forums > sources > Topic.

There, look for:

return \IPS\Db::i()->select( 'COUNT(*)', 'forums_posts', $where )->first();

And change it to:

return \IPS\Db::i()->select( 'COUNT(*)', 'forums_archive_posts', $where )->first();

Credits go to ZIKURIK.

  • Like 2
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...