1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Rebuild Forum Information Cron

Discussion in 'XenForo Questions and Support' started by Dynamic, Aug 12, 2013.

  1. Dynamic

    Dynamic Well-Known Member

    Hello,

    I am just wondering how you would add a cron entry to rebuild the forum information? My latest posts are not displaying properly from time to time and it gets fixed by manually rebuilding the forum information cache. I would like this to be automatic and done once an hour.

    I can see where to add it, but I have no idea what to add for the callback, etc. Any help would be appreciated.

    Thanks.
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    ACP -> Tools -> Cron Entries -> Rebuild Board Totals Counter

    However, this should be running every hour on the 3rd minute.
     
  3. Dynamic

    Dynamic Well-Known Member

    Hi King,

    So the board totals counter is the same thing as forum information cache? For some reason the "latest post" does issue does not get fixed unless I manually run the cache rebuild. The "Rebuild Board Totals Counter" is active in the Cron Entries page. I am sure there is a bug with something, but right now this is the easiest way to fix the issue.
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    That information should be instantaneous, I believe. I misread your original post and thought you meant the statistics. Are you receiving errors in the server error log?
     
  5. Dynamic

    Dynamic Well-Known Member

    Yes, but it is for the bdBank addon. Nothing with the latest post information.
     
  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    If you disable the [bd] bank add-on temporarily, and make a post, does the information update?
     
  7. Dynamic

    Dynamic Well-Known Member

    Hi King,

    I don't really want to disable the addon as it is very much needed. The latest post does not happen on every post either, it is just here and there. It may happen to 1 or 2 posts a day. So if I disable the bdBank addon I will need to keep it off for a day or so to see if it fixes the problem. I really don't want to do this as it is heavily used. Though, I do not think it is the bank addon causing the issues. This is the error I get.

    Code:
    Error Info
    Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Duplicate entry '1' for key 'transaction_id' - library/Zend/Db/Statement/Mysqli.php:214
    Generated By: Unknown Account, 30 minutes ago
    Stack Trace
    #0 /home/thereefu/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
    #1 /home/thereefu/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
    #2 /home/thereefu/public_html/library/bdBank/Model/Bank.php(199): Zend_Db_Adapter_Abstract->query('????INSERT INTO...', 1373674034)
    #3 /home/thereefu/public_html/library/bdBank/CronEntry/Transaction.php(8): bdBank_Model_Bank->archiveTransactions()
    #4 [internal function]: bdBank_CronEntry_Transaction::archive(Array)
    #5 /home/thereefu/public_html/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array)
    #6 /home/thereefu/public_html/library/XenForo/Deferred/Cron.php(20): XenForo_Model_Cron->runEntry(Array)
    #7 /home/thereefu/public_html/library/XenForo/Model/Deferred.php(197): XenForo_Deferred_Cron->execute(Array, Array, 9.99999904633, '')
    #8 /home/thereefu/public_html/library/XenForo/Model/Deferred.php(320): XenForo_Model_Deferred->runDeferred(Array, 9.99999904633, '', false)
    #9 /home/thereefu/public_html/library/XenForo/Model/Deferred.php(273): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
    #10 /home/thereefu/public_html/deferred.php(15): XenForo_Model_Deferred->run(false)
    #11 {main}
    Request State
    array(3) {
      ["url"] => string(41) "http://www.xxxxxxx.com.au/deferred.php"
      ["_GET"] => array(0) {
      }
      ["_POST"] => array(3) {
        ["_xfRequestUri"] => string(43) "/threads/typhon-led-controller-review.1295/"
        ["_xfNoRedirect"] => string(1) "1"
        ["_xfResponseType"] => string(4) "json"
      }
    }
    These errors happen every 59 - 61 minutes on the dot.
     
  8. Jeremy

    Jeremy XenForo Moderator Staff Member

    If the bank causes an error and fails out of the function before it updates the forum information, [bd] bank could very well be the issue. You may want to contact the author about that issue for a fix, it may be the cause.
     
  9. Dynamic

    Dynamic Well-Known Member

    Hey King,

    I let him know, I am not sure if he is working on a fix or not. In the mean time, is there a way I can add the "Rebuild Forum Information Cache" in as a cron job?

    Thanks.
     
  10. Ömer Görür

    Ömer Görür Member

    I'm wondering to do this :(
     

Share This Page