• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • ErrorException: [E_WARNING] min(): Array must contain at least one element src/addons/vw/vw/_core/model/cron/deferred/lastupdate/vw.php:219

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: ErrorException: [E_WARNING] min(): Array must contain at least one element src/addons/vw/vw/_core/model/cron/deferred/lastupdate/vw.php:219

    • Issue Tools
      • View Changes
    1. issueid=6211 June 18, 2021 7:28 AM
      Forsaken Forsaken is offline
      Junior Member
      ErrorException: [E_WARNING] min(): Array must contain at least one element src/addons/vw/vw/_core/model/cron/deferred/lastupdate/vw.php:219

      #0 [internal function]: XF::handlePhpError(2, '[E_WARNING] min...', '/var/www/vhosts...', 219, Array)
      #1 src/addons/vw/vw/_core/model/cron/deferred/lastupdate/vw.php(219): min(Array)
      #2 src/addons/vw/vw/_core/model/cron/deferred/lastupdate/vw.php(30): vw_Cron_Deferred_LastUpdate_Model->build(Array)
      #3 src/addons/vw/vw/_core/model/cron/deferred/vw.php(64): vw_Cron_Deferred_LastUpdate_Model->run(Array)
      #4 src/addons/vw/vw/Handler/Job/Defer.php(30): vw_Cron_Deferred_Model->exec()
      #5 src/XF/Job/Manager.php(258): vw\vw\Handler\Job\Defer->run(7.98792)
      #6 src/addons/Hampel/JobRunner/XF/Job/Manager.php(87): XF\Job\Manager->runJobInternal(Array, 7.98792)
      #7 src/XF/Job/Manager.php(200): Hampel\JobRunner\XF\Job\Manager->runJobInternal(Array, 7.98792)
      #8 src/addons/Hampel/JobRunner/XF/Job/Manager.php(80): XF\Job\Manager->runJobEntry(Array, 7.98792)
      #9 src/XF/Job/Manager.php(84): Hampel\JobRunner\XF\Job\Manager->runJobEntry(Array, 7.98792)
      #10 src/addons/Hampel/JobRunner/XF/Job/Manager.php(24): XF\Job\Manager->runQueue(false, 8)
      #11 job.php(43): Hampel\JobRunner\XF\Job\Manager->runQueue(false, 8)
      #12 {main}
      Dumping errors I've received while working on setting up my templates. Not sure where this came from.
    Issue Details
    Issue Number 6211
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Unknown
    Status Fixed
    Priority 4 - Warnings / Script Errors
    Affected Version 4.1.2
    Fixed Version 4.1.2
    Milestone (none)
    Software DependencyXenForo 2.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. June 18, 2021 7:31 AM
      Forsaken Forsaken is offline
      Junior Member
      XF\Db\InvalidQueryException: Job vw\vw\Handler\Job\Defer: MySQL statement prepare error [1064]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY displayorder ASC' at line 1 src/XF/Db/AbstractStatement.php:228

      UPDATE `xf_vw_chapterorder` SET `displayorder` = (@new_chapter_order := @new_chapter_order + 10) WHERE rootid = ORDER BY displayorder ASC
      ------------

      #0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1064, '42000')
      #1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1064, '42000')
      #2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
      #3 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
      #4 src/addons/vw/vw/_core/controller/db/xf2.php(117): XF\Db\AbstractAdapter->query('UPDATE `xf_vw_...')
      #5 src/addons/vw/vw/_core/model/db/mysql/vw.php(1386): vw_DB_Controller_XF2->query_write('UPDATE `xf_vw_...')
      #6 src/addons/vw/vw/_core/model/db/mysql/vw.php(983): vw_DB_MySQL_Model->shutdown_or_run('UPDATE `xf_vw_...', false)
      #7 src/addons/vw/vw/_core/controller/dm/item/chapter/vw.php(844): vw_DB_MySQL_Model->update(Array)
      #8 src/addons/vw/vw/_core/controller/dm/vw.php(135): vw_DM_Item_Chapter_Controller->delete_multiple(Array)
      #9 src/addons/vw/vw/_core/model/cron/deferred/node/vw.php(403): vw_DM_Controller->delete_multiple(Array)
      #10 src/addons/vw/vw/_core/model/cron/deferred/node/vw.php(115): vw_Cron_Deferred_Node_Model->delete(Array)
      #11 src/addons/vw/vw/_core/model/cron/deferred/vw.php(64): vw_Cron_Deferred_Node_Model->run(Array)
      #12 src/addons/vw/vw/Handler/Job/Defer.php(30): vw_Cron_Deferred_Model->exec()
      #13 src/XF/Job/Manager.php(258): vw\vw\Handler\Job\Defer->run(7.99332)
      #14 src/addons/Hampel/JobRunner/XF/Job/Manager.php(87): XF\Job\Manager->runJobInternal(Array, 7.99332)
      #15 src/XF/Job/Manager.php(200): Hampel\JobRunner\XF\Job\Manager->runJobInternal(Array, 7.99332)
      #16 src/addons/Hampel/JobRunner/XF/Job/Manager.php(80): XF\Job\Manager->runJobEntry(Array, 7.99332)
      #17 src/XF/Job/Manager.php(84): Hampel\JobRunner\XF\Job\Manager->runJobEntry(Array, 7.99332)
      #18 src/addons/Hampel/JobRunner/XF/Job/Manager.php(24): XF\Job\Manager->runQueue(false, 8)
      #19 job.php(43): Hampel\JobRunner\XF\Job\Manager->runQueue(false, 8)
      #20 {main}
      Reply Reply  
    2. June 19, 2021 12:01 PM
      pegasus pegasus is offline
      VaultWiki Team
      For the first error, in src/addons/vw/vw/_core/model/cron/deferred/lastupdate/vw.php, find:
      Code:
      $min = min($min);
      Replace with:
      Code:
      			if ($already)
      			{
      				$min = min($min);
      			}
      			else
      			{
      				$min = 0;
      			}
      As for the second error, this behavior occurs because the parent book has a damaged parent-list field, or the book that contains the chapters you are deleting was deleted before the chapters. I suspect you are encountering the second behavior, in that you are deleting a book, and the sub-task that deletes its chapters too is taking too long and finishes after the book has already been removed. From what I can tell, the stage at which the error occurs should be late enough that the deletion is completely successful, though.
      Reply Reply  
    3. June 19, 2021 12:23 PM
      Forsaken Forsaken is offline
      Junior Member
      It was likely the second one, and it did delete if it's the chapter I think it was.
      Reply Reply  
    4. June 20, 2021 4:02 PM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed the delayed chapter delete error in the next build.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 6:35 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.