• 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
    • [4.1 Alpha 1] MySQL statement prepare error [1054]: Unknown column 'c.pageid' in 'on clause'

    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: [4.1 Alpha 1] MySQL statement prepare error [1054]: Unknown column 'c.pageid' in 'on clause'

    • Issue Tools
      • View Changes
    1. issueid=5561 January 2, 2019 6:41 AM
      ACL ACL is offline
      Regular Member
      [4.1 Alpha 1] MySQL statement prepare error [1054]: Unknown column 'c.pageid' in 'on clause'

      I've just installed a fresh version of VW 4.1 Alpha 1 b002 to my local dev environment. After installing, I am unable to load any areas of XenForo outside of the admin cp due to a MySQL statement prepare error.

      An exception occurred: [XF\Db\Exception] MySQL statement prepare error [1054]: Unknown column 'c.pageid' in 'on clause' in src/XF/Db/AbstractStatement.php on line 212

      Code:
      XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
      XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
      XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
      XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 79
      XF\Db\AbstractAdapter->query() in src/addons/vw/vw/_core/controller/db/xf2.php at line 148
      vw_DB_Controller_XF2->query_read() in src/addons/vw/vw/_core/model/db/mysql/vw.php at line 25
      vw_DB_MySQL_Model->select() in src/addons/vw/vw/_core/controller/fetch/vw.php at line 333
      vw_Fetch_Controller->get() in src/addons/vw/vw/_core/controller/fetch/vw.php at line 658
      vw_Fetch_Controller->get_index() in src/addons/vw/vw/_core/controller/fetch/vw.php at line 464
      vw_Fetch_Controller->return_the_index() in src/addons/vw/vw/_core/controller/fetch/vw.php at line 236
      vw_Fetch_Controller->get() in src/addons/vw/vw/_core/model/ui/tab/index/vw.php at line 30
      vw_UI_Tab_Index_Model->can_main_tab() in src/addons/vw/vw/_core/model/ui/tab/vw.php at line 56
      vw_UI_Tab_Model->check() in src/addons/vw/vw/_core/model/plugins/general/vw.php at line 239
      vw_Plugins_General_Model->get_raw_links() in src/addons/vw/vw/_core/model/plugins/general/xf2.php at line 152
      vw_Plugins_General_Model_XF2->get_raw_links() in src/addons/vw/vw/_core/model/plugins/general/vw.php at line 180
      vw_Plugins_General_Model->get_nav_links() in src/addons/vw/vw/Helper/Model/Navigation.php at line 26
      vw\vw\Helper\Model\Navigation::canViewNav() in internal_data/code_cache/navigation_cache.php at line 276
      XF\Pub\App->{closure}() in src/XF/Template/Templater.php at line 5768
      XF\Template\Templater->renderNavigationClosure() in src/XF/Pub/App.php at line 475
      XF\Pub\App->getNavigation() in src/XF/Pub/App.php at line 428
      XF\Pub\App->renderPageHtml() in src/XF/App.php at line 1769
      XF\App->renderPage() in src/XF/Mvc/Dispatcher.php at line 310
      XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 44
      XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1934
      XF\App->run() in src/XF.php at line 333
      XF::runApp() in index.php at line 13
      Code:
      SELECT `liked`.*,`l`.*,`ch`.*,`c`.*,`i`.*,`r`.*,`page`.*,`likes`.`likes`,`likes`.`like_users`,`sub`.`subscribeid` AS `issubscribed`,`sub`.`notifytype` AS `subscribetype`,`sub`.`options` AS `subscribeoptions`,`mk`.`readtime`,`l`.`userid` AS `translate_userid`,`ch`.`userid` AS `chapter_userid`,`r`.`dateline` AS `edit_dateline`,`r`.`flags` + 0 AS `flags`,NULL AS `edit_parentid`,`page`.`pageid` FROM `vw_page` `page`  LEFT JOIN `vw_route` `i` ON (`page`.`pageid` = `i`.`itemid` AND `i`.`itemtypeid` = 1) 
       LEFT JOIN `vw_counter` `c` ON (`c`.`pageid` = `page`.`pageid`) 
       LEFT JOIN `vw_revision` `r` ON (`r`.`revisionid` = `page`.`revisionid`) 
       LEFT JOIN `vw_chapter` `ch` ON (`page`.`pageid` = `ch`.`pageid`) 
       LEFT JOIN `vw_langitem` `l` ON (`page`.`pageid` = `l`.`pageid`) 
       LEFT JOIN `vw_markread` `mk` ON (`mk`.`itemtypeid` = 1 AND `mk`.`itemid` = `page`.`pageid` AND `mk`.`userid` = 1) 
       LEFT JOIN `vw_subscribe` `sub` ON (`sub`.`nodetypeid` = 1 AND `sub`.`nodeid` = `page`.`pageid` AND `sub`.`userid` = 1) 
       LEFT JOIN `vw_likes` `likes` ON (`likes`.`itemtypeid` = 1 AND `likes`.`itemid` = `page`.`pageid`) 
       LEFT JOIN `xf_liked_content` `liked` ON (`liked`.`content_type` = 'vwpage' AND `liked`.`content_id` = `page`.`pageid` AND `liked`.`like_user_id` = 1)   WHERE `page`.`areaid` = 0
    Issue Details
    Issue Number 5561
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category General
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.1.0 Alpha 1 Public
    Fixed Version (none)
    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. January 2, 2019 2:24 PM
      pegasus pegasus is offline
      VaultWiki Team
      This could be caused by an incorrect version number being set at the end of installation, which should be fixed in the build 002 installer now. Since your installation already completed, you will need to manually set the settings:

      Options > Debug Options > VaultWiki Version = 4.1.0 Alpha 1
      Options > Debug Options > VaultWiki Platform Version = (to match your current XenForo version number; e.g. "2.0.8")

      This is odd though because there should be protections against running database queries when there is a version mismatch. I will not mark the issue fixed until I can confirm why this protection is being bypassed in XF2.
      Reply Reply  
    2. January 2, 2019 2:58 PM
      ACL ACL is offline
      Regular Member
      When you say Options, do you mean under the Wiki admin menu option, or through Add-ons > VaultWiki > Options?

      I'm currently not able to load any of the wiki-related pages within the Wiki admin menu, since they all return the message "The wiki is currently being upgraded. Please check back later." I can alter Addon settings for VaultWiki just fine, though.

      I'm now wondering whether something was left behind from b001 (particularly with the install hiccups prior to fixing), which I uninstalled before copying b002 files then (re)installing from step 1. So I might try dropping my xf2 testing database and bring in a backup from before b001, then install b002 and see if I'm any better off.
      Reply Reply  
    3. January 2, 2019 3:15 PM
      pegasus pegasus is offline
      VaultWiki Team
      This would not have been caused by installation problems during build 001. Neither build was writing the current-version options correctly.

      You can find these options under AdminCP > Setup > Options > Debug Options.
      Reply Reply  
    4. January 2, 2019 3:25 PM
      ACL ACL is offline
      Regular Member
      Right, now I see them.

      vw_platform_string was '' (empty)
      vw_version_string was '0.0.0'

      This fixes the reported issue (MySQL statement prepare error around public areas of the XF2 dev site) and also the "The wiki is currently being upgraded. Please check back later." message seen under the Wiki nav heading in the admin cp

      Thanks!
      Reply Reply  
    5. January 2, 2019 4:02 PM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed the precipitating issue of the error above: permissions were being calculated for the wiki navigation tab even though the version options were not marked current yet.
      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 8:24 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.