• 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
    • Column Name Collisions Result in NULL Values

    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: Column Name Collisions Result in NULL Values

    • Issue Tools
      • View Changes
    1. issueid=6000 March 30, 2020 1:15 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Column Name Collisions Result in NULL Values

      Error Info
      XenForo_Exception: Database Error: INSERT IGNORE INTO `vw_activity` (`contenttypeid`, `contentid`, `collapseid`, `areaid`, `parentid`, `userid`, `dateline`) VALUES (1,1477,0,2,2,416981,) Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1 - library/vw/_core/controller/db/xf.php:185
      Generated By: Alfa, A moment ago

      Stack Trace
      #0 /library/vw/_core/controller/db/xf.php(169): vw_DB_Controller_XF->throw_error(Object(Zend_Db_Statement_Mysqli_Exception) , 'INSERT IGNORE ...')
      #1 /library/vw/_core/model/db/mysql/vw.php(1339): vw_DB_Controller_XF->query_write('INSERT IGNORE ...')
      #2 /library/vw/_core/model/db/mysql/vw.php(1084): vw_DB_MySQL_Model->shutdown_or_run('INSERT IGNORE ...', false)
      #3 /library/vw/_core/controller/dm/base/vw.php(3181): vw_DB_MySQL_Model->insert(Array)
      #4 /library/vw/_core/controller/dm/base/vw.php(2938): vw_DM_Base_Controller->create_stream()
      #5 /library/vw/XenForo/DataWriter.php(745): vw_DM_Base_Controller->update_stream()
      #6 /library/vw/_core/controller/dm/vw.php(129): vw_XenForo_DataWriter->write_stream(NULL)
      #7 /library/vw/_install/lib/upgradepath/steps/4/1/0/alpha/1/base/vw.php(2768): vw_DM_Controller->__call('write_stream', Array)
      #8 /library/vw/_install/lib/upgradepath/steps/4/1/0/alpha/1/base/vw.php(1636): vw_Install_UpgradePath_Steps_410alpha1_base_Controller->fill_activity(Object(vw_Install_UpgradePath_Controller_X F), true, 'Page')
      #9 /library/vw/_core/controller/progress/steps/vw.php(85): vw_Install_UpgradePath_Steps_410alpha1_base_Controller->{closure}(Object(vw_Install_UpgradePath_Controller_XF) , true)
      #10 /library/vw/_core/controller/progress/steps/vw.php(56): vw_Progress_Steps_Controller->call(Object(vw_Install_UpgradePath_Controller_XF), Object(Closure))
      #11 /library/vw/_install/lib/upgradepath/vw.php(78): vw_Progress_Steps_Controller->execute(Object(vw_Install_UpgradePath_Controller_XF))
      #12 /library/vw/_core/controller/progress/vw.php(169): vw_Install_UpgradePath_Controller->exec_script(Array)
      #13 /library/vw/_core/view/response/progress/vw.php(27): vw_Progress_Controller->execute()
      #14 /library/vw/_core/view/response/progress/vw.php(63): vw_Response_Progress_View->stream()
      #15 /library/vw/XenForo/ViewAdmin.php(67): vw_Response_Progress_View->render()
      #16 /library/XenForo/ViewRenderer/Abstract.php(229): vw_XenForo_ViewAdmin->renderRaw()
      #17 /library/XenForo/ViewRenderer/Raw.php(53): XenForo_ViewRenderer_Abstract->renderViewObject('vw_XenForo_View...', 'Raw', Array, 'vw_general_view')
      #18 /library/XenForo/FrontController.php(624): XenForo_ViewRenderer_Raw->renderView('vw_XenForo_View...', Array, 'vw_general_view', NULL)
      #19 /library/XenForo/FrontController.php(176): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_Raw), Array)
      #20 /admin.php(13): XenForo_FrontController->run()
      #21 {main}
      Request State
      array(3) {
      ["url"] => string(57) "/admin.php?wiki/upgrade&progress=1"
      ["_GET"] => array(3) {
      ["wiki/upgrade"] => string(0) ""
      ["progress"] => string(1) "1"
      ["panel"] => string(7) "install"
      }
      ["_POST"] => array(4) {
      ["wiki/upgrade"] => string(0) ""
      ["progress"] => string(1) "1"
      ["_xfToken"] => string(8) "********"
      ["panel"] => string(7) "install"
      }
      }
    Issue Details
    Issue Number 6000
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Install / Upgrade
    Status Flagged for Future
    Priority 2 - Fatal / Database Errors
    Affected Version 4.1.0 RC 2
    Fixed Version (none)
    Milestone VaultWiki 4.2
    Software DependencyXenForo 1.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. March 30, 2020 4:44 PM
      pegasus pegasus is offline
      VaultWiki Team
      This seems logically impossible. We are processing existing pages here. If the row exists, vw_page.dateline should always contain an integer value, but this error suggests that it contained a NULL value.

      I'll need some more information about the internal data state. In library/vw/_install/lib/upgradepath/steps/4/1/0/alpha/1/base/vw.php, find:
      Code:
      $dm->write_stream();
      BEFORE it, add:
      Code:
      if (empty($entry['dateline']))var_dump($entry);
      Then attempt again. PM me the debug output.
      Reply Reply  
    2. March 30, 2020 5:26 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      It seems to me that there is no difference between the errors in the XF error log. What is different is that the error does not display in the upgrader.
      Reply Reply  
    3. March 30, 2020 5:41 PM
      pegasus pegasus is offline
      VaultWiki Team
      Oh since this isn't XF2, you'll need to look at the XHR response in your browser's developer tools.
      Reply Reply  
    4. March 30, 2020 7:08 PM
      pegasus pegasus is offline
      VaultWiki Team
      dateline = NULL when attempting to fetch the data for a page that is flagged as an attachment, but that attachment data does not exist in the database (probably corrupted by a database error a long time ago). This is because the dateline field of the attachment overwrites the page's dateline, but since the attachment is missing from the database, this becomes a NULL value.

      We need to make a job in 4.2 of eliminating column name collisions, so that weird stuff like this can't happen anymore. (4.2 because renaming a majority of existing database columns can introduce a lot of bugs and needs to be done at an alpha stage).

      In the mean time, the following change should be able to work around the issue. In library/vw/_core/controller/fetch/stack/vw.php, find:
      Code:
      $stack['fields'] += $tmp['fields'];
      Replace with:
      Code:
      $stack['fields'] = $tmp['fields'] + $stack['fields'];
      Reply Reply  
    5. March 30, 2020 7:17 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      I made the file edits but Im still getting the same.
      Reply Reply  
    6. March 30, 2020 7:23 PM
      pegasus pegasus is offline
      VaultWiki Team
      You tend to have a long-lived PHP opcache. I just checked your admin panel and no longer receive that error.
      Reply Reply  
    7. March 30, 2020 7:25 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Yes, its running now.
      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 3:27 AM.
    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.