• 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
    • Upgrading from 3 to 4.0.17

    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: Upgrading from 3 to 4.0.17

    • Issue Tools
      • View Changes
    1. issueid=4991 April 4, 2017 12:55 PM
      stained stained is offline
      Junior Member
      Upgrading from 3 to 4.0.17

      Hi,

      I'm on vb 4.2.4 and just bought the Vault Wiki upgrade to 4.0.17 (was on 3.0.20). I'm stuck at:

      "Upgrading to 4.0.4

      Step 11"

      with the following error:

      Duplicate entry '1' for key 'PRIMARY' in ..../includes/class_core.php on line 1394


      How do I get around this?

      Thanks
    Issue Details
    Issue Number 4991
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Unknown
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.0.17
    Fixed Version (none)
    Milestone (none)
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. April 4, 2017 1:31 PM
      stained stained is offline
      Junior Member
      I hope I've put this in the right place as I doubt it's a "bug".
      Reply Reply  
    2. April 4, 2017 2:00 PM
      pegasus pegasus is offline
      VaultWiki Team
      If I found the right step, this will probably happen if you double-click the Next Step or Next Batch button in Manual Mode. Once you get this error it would not be possible to move past it normally (such as refreshing the page).

      In vault/install/lib/upgradepath/4/0/4/base/vw.php, find:
      Code:
      				vw_DB::get()->query()->insert(array(
      					'table' => 'vw_counter',
      					'values' => $values
      				));
      Replace with:
      Code:
      				vw_DB::get()->query()->insert(array(
      					'table' => 'vw_counter',
      					'ignore' => 1,
      					'values' => $values
      				));
      However, I'm confused by your assertion that you are upgrading directly from 3.0.20 to 4.0.17. This is actually impossible. There is no direct upgrade path from 3.x to 4.x. Instead, you must create a separate installation of 4.x and use the importer to migrate data from 3.x. Are you following the steps here: https://www.vaultwiki.org/blogs/56/
      Reply Reply  
    3. April 5, 2017 1:38 AM
      stained stained is offline
      Junior Member
      Cool. That worked. A few clicks later at: Upgrading to 4.0.4 Step 14 I ran into this:
      Code:
      Invalid SQL:
      DELETE `searchcore_text`  FROM `searchcore` `searchcore`  LEFT JOIN `searchcore_text` `searchcore_text` ON (`searchcore`.`searchcoreid` = `searchcore_text`.`searchcoreid`)   WHERE `searchcore`.`contenttypeid` =;
      
      mysqli_query(): (42000/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 '' at line 1 in ..../includes/class_core.php on line 1394
      I will go ahead and read the blog. I wasn't aware that there was no direct upgrade path.
      Reply Reply  
    4. April 5, 2017 2:35 AM
      stained stained is offline
      Junior Member
      Okay, I have followed all steps contained in your installation blog link and also re-uploaded all files from the vault wiki package. I recommenced the upgrade procedure which stops as described below. Would appreciate your help with this.

      This is the complete error notification displayed by the upgrade script when it gets to Step 14 in auto-mode:
      Code:
      Upgrading to 4.0.4
      
      Step 14
      
      Removing entries from table: searchcore_text
      mysqli_query(): (42000/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 '' at line 1
      #0: vw_CP_Progress_View->handle_php_error()
      #1: mysqli_query() in [path]/includes/class_core.php at line 1394
      #2: vB_Database_MySQLi->execute_query() in [path]/includes/class_core.php at line 444
      #3: vB_Database->query_write() in [path]/vault/core/controller/db/vb3.php at line 230
      #4: vw_DB_Controller_vB3->query_write() in [path]/vault/core/model/db/mysql/vw.php at line 1105
      #5: vw_DB_MySQL_Model->shutdown_or_run() in [path]/vault/core/model/db/mysql/vw.php at line 352
      #6: vw_DB_MySQL_Model->delete() in [path]/vault/install/lib/upgradepath/steps/4/0/4/3X/vb3.php at line 145
      #7: vw_Install_UpgradePath_Steps_404_3X_Controller_vB3->{closure}() in [path]/vault/core/controller/progress/steps/vw.php at line 83
      #8: vw_Progress_Steps_Controller->call() in [path]/vault/core/controller/progress/steps/vw.php at line 53
      #9: vw_Progress_Steps_Controller->execute() in [path]/vault/install/lib/upgradepath/vw.php at line 62
      #10: vw_Install_UpgradePath_Controller->exec_script() in [path]/vault/core/controller/progress/vw.php at line 74
      #11: vw_Progress_Controller->execute() in [path]/vault/core/controller/cp/progress/vw.php at line 35
      #12: vw_CP_Progress_Controller->process() in [path]/vault/core/controller/cp/install/vw.php at line 286
      #13: vw_CP_Install_Controller->upgrade() in [path]/vault/core/controller/cp/install/vw.php at line 57
      #14: vw_CP_Install_Controller->execute() in [path]/vault/helper/vb/global.php at line 64
      #15: require_once() in [path]/vault/install/index.php at line 38
      #16: require() in [path]/dbseo.php at line 498
      At this point the installation hangs. If I go to manual mode the script goes back a few steps and lets me click through to Step 14 where I see:
      Code:
      Step 14
      
      Removing entries from table: searchcore_text
      
      PHP Warning: mysqli_query(): (42000/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 '' at line 1 in ..../includes/class_core.php on line 1394
      The error text says:
      Code:
      Database error in vBulletin 4.2.4:
      
      Invalid SQL:
      DELETE `searchcore_text`  FROM `searchcore` `searchcore`  LEFT JOIN `searchcore_text` `searchcore_text` ON (`searchcore`.`searchcoreid` = `searchcore_text`.`searchcoreid`)   WHERE `searchcore`.`contenttypeid` =;
      
      MySQL Error   : 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 '' at line 1
      Error Number  : 1064
      Request Date  : Wednesday, April 5th 2017 @ 06:52:03 AM
      Error Date    : Wednesday, April 5th 2017 @ 06:52:03 AM
      Script        : [url]http://www.mysite.com/forum/vault/install/index.php[/url]
      Referrer      : [url]https://www.mysite.com/forum/vault/install/index.php[/url]
      IP Address    : xxx
      Username      : xxx
      Classname     : vB_Database_MySQLi
      MySQL Version : 5.6.35
      Reply Reply  
    5. April 5, 2017 10:33 AM
      pegasus pegasus is offline
      VaultWiki Team
      What is happening here is that parts of the original product installation of VaultWiki 4.x were damaged in some way, and the database cannot locate some of it. In this case, it cannot find a contenttype record, which is a very basic thing that vBulletin 4 needs that dictates how a forum modification should interact with the board.

      If this record is missing, then I suspect there are also other problems. This is probably related to your post back in 2014 about problems you had "upgrading" at that time: https://www.vaultwiki.org/threads/5638/
      According to our records, although you considered it in the thread, it does not look like you ended up purchasing that import service after all.

      I recommend that you submit a ticket so that we can assess the damage so far and determine whether a repair vs a reinstall should be performed, how this should be done to avoid further loss to wiki data, and so that we can perform those steps for you. This is currently covered under your support subscription for no additional charge.
      Reply Reply  
    6. April 5, 2017 11:18 AM
      stained stained is offline
      Junior Member
      Hi,

      I downloaded vw4 back then but never actually installed it and instead just continued with vw3 until now.

      I've just submitted a ticket to you.

      Thanks again for your help.



      EDIT: the FTP account that I created for you only has access to public_html. For root access please use the same password but change the username to "vw2@mysite.com"
      Reply Reply  
    7. April 6, 2017 4:23 AM
      stained stained is offline
      Junior Member
      Many thanks for your assistance. The upgrade went through smoothly this time I have a problem now with htaccess rules as I'm seeing this message when attempting to access my wiki:

      Configuration error: wiki_index.php was called by another PHP script.
      This can cause an infinite loop if the calling script is the same as the DEFAULT_SCRIPT.


      I would really appreciate some help with this as htaccess scares the #### out of me. I applied the steps here: https://www.vaultwiki.org/pages/Help...les-like-vBSEO but clicking on thread urls resulted in a 404 so I reversed the edit.

      I have the vb suite installed at /forum and I have DBSEO installed.

      My site works correctly (less vaultwiki) with the following htaccess files in place:

      the content of /forum/htaccess is as follows:
      Code:
      <IfModule mod_rewrite.c>
      	RewriteEngine On
      
      	# If you are having problem with "None Could Be Negotiated" errors in Apache, uncomment this to turn off MultiViews
      	# Options -MultiViews
      
      	#Options -Indexes
      	
      	#start vaultwiki rules	
      	#end vaultwiki rules
      
      	# Force SSL:
      	RewriteCond %{HTTPS} off
      	RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
      
      	# Force www:
      	RewriteCond %{HTTP_HOST} !^$
      	RewriteCond %{HTTP_HOST} !^www\. [NC]
      	RewriteCond %{HTTPS}s ^on(s)|
      	RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
      
      	RewriteCond %{QUERY_STRING} !dbseourl=
      	RewriteCond %{REQUEST_URI} !(adverts/|dbseocp/|more/|cron|mobiquo|forumrunner|api\.php|reviewpost/|classifieds/|photopost/)
      	RewriteRule ^(.*\.php)$ dbseo.php?dbseourl=$1 [L,QSA]
      
      	RewriteCond %{REQUEST_FILENAME} !-f
      	RewriteCond %{REQUEST_FILENAME} !-d
      	RewriteCond %{REQUEST_FILENAME} !/(adverts|dbseocp|more|clientscript|cpstyles|images|reviewpost|classifieds|photopost)/
      	RewriteRule ^(.+)$ dbseo.php [L,QSA]
      </IfModule>
      and the content of public_html/htaccess is:
      Code:
      ErrorDocument 403 /403.shtml
      
      <IfModule mod_rewrite.c>
      	RewriteEngine On
      	#Options -Indexes
      	Options +FollowSymLinks
      
      
      	#prevent directory browsing#
      
      	# Force SSL:
      	RewriteCond %{HTTPS} off
      	RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
      
      	# Force www:
      	RewriteCond %{HTTP_HOST} !^$
      	RewriteCond %{HTTP_HOST} !^www\. [NC]
      	RewriteCond %{HTTPS}s ^on(s)|
      	RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
      
      	##vaultwiki
      	#RewriteRule ^forum/showwiki/(.*)$ forum/showwiki.php?pretty=1 [L]
      	#RewriteRule '^forum/showwiki\.php\?title=(\w+)$' => 'forum/wiki/$1'
      
      	#Remove index.php from mysite.com/index.php
      	#rewrite engine on
      	RewriteCond %{THE_REQUEST} index\.php
      	RewriteCond %{QUERY_STRING} ^$
      	RewriteRule ^index\.php$ / [L,R=301]
      Reply Reply  
    8. April 6, 2017 9:43 AM
      stained stained is offline
      Junior Member
      Okay, I'm able to access wiki_index.php after I added "|wiki|yui" in the appropriate place within the htaccess at /forum/. I didn't make the other change because it caused 404s:

      Using the vBSEO example, your .htaccess file might already contain something similar to the following:
      Code:
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
      RewriteRule ^(.+)$ vbseo.php [L,QSA]

      This block should be completely commented out or removed, since VaultWiki accomplishes the same thing.


      Is it normal that things work even without that change?

      EDIT: nah... wiki_index.php is somehow redirecting to "/forum/wiki_index/" which of course doesn't exist. What a mess.
      Reply Reply  
    9. April 6, 2017 9:45 AM
      pegasus pegasus is offline
      VaultWiki Team
      Please edit vault/config.php and change all references of vbseo.php to dbseo.php

      In your .htaccess, at this line:
      Code:
      RewriteCond %{REQUEST_URI} !(adverts/|dbseocp/|more/|cron|mobiquo|forumrunner|api\.php|reviewpost/|classifieds/|photopost/)
      Add:
      Code:
      |wiki|yui
      In the parentheses at the end.
      Reply Reply  
    10. April 6, 2017 12:11 PM
      stained stained is offline
      Junior Member
      That's great. Many thanks. I have a few other issues unrelated to this but I'll start a new thread.
      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 5:52 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.