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

XF 1.3 Uploaded 1.3 upgrade files and now forum setup is wiped

Discussion in 'Installation, Upgrade, and Import Support' started by Samus4145, Mar 21, 2014.

  1. Samus4145

    Samus4145 Member

    Last night I decided to upload the xenfor 1.3 upgrade files. The first time, it told me I can't upgrade because the files I have are newer than the upgrade files.

    The next time I let it upload overnight and when I logged on this morning and tried to run the upgrade URL, i am presented with a page telling me I am ready to install 1.2.4 and need to enter all the mySQL database information once again.

    What can I do to restore everything back to normal?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Are you sure you uploaded the 1.3 upgrade .zip to the correct location?

    When I try to access the URL in your account, there is a redirect loop.

    Presumably you took a backup before starting the upgrade?
     
  3. Samus4145

    Samus4145 Member

    Yup, I'm sure. I got the overwrite notifications when uploading the files. As for the redirect, we moved the forums to a subdirectory URL (forums.selectbutton.com) before 1.2 was released and haven't had any issues upgrading up to 1.2.4 at this point. I use the standard link when upgrading ant haven't had problems in the past. http://selectbutton.com/forums/install

    We do have a full backup for the entire site, but would take some time to pull down from the server (full directory backup, not just xenforo).
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    If the install prompt is advising you to install 1.2.4 then you either haven't uploaded the 1.3 upgrade files or you uploaded them to the wrong location.

    To receive that install prompt the config.php and install_lock files must be missing.

    Check that the /data and /internal_data directories are still intact.
    If they are, upload the 1.3 upgrade .zip and restore the config.php and install_lock files.
    Then try again.
     
    Samus4145 likes this.
  5. Mike

    Mike XenForo Developer Staff Member

    This is definitely from the library/config.php file being wiped out. (This is where the "merging" of directories is important, though it applies to add-ons as well.) You'll need to restore that or recreate it based of config.php.default. (Check the things that @Brogan mentioned as well.)

    Though if it's telling you to install 1.2.4, that's a weird situation unless you have an opcode cache that doesn't automatically clear when files change. You may need to try restarting your web server in that case.
     
    Samus4145 likes this.
  6. Samus4145

    Samus4145 Member

    Thanks guys, I'll see if I can replace with my backup and make sure everything is working correctly again with 1.2.4 before trying to upload one again. I think the issue may be with Fetch, the FTP client we use, as it tends to freeze while uploading multiple files, so it may have not completed when it says it did.
     
  7. Samus4145

    Samus4145 Member

    I was able to download my backup and replace the entire forums folder with the backup version. Anytime I try and access a link for the forums, I get a download called download.

    Opening the files in Notepad ++ produces the following:
    <?php

    $startTime = microtime(true);
    $fileDir = dirname(__FILE__);

    require($fileDir . '/library/XenForo/Autoloader.php');
    XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');

    XenForo_Application::initialize($fileDir . '/library', $fileDir);
    XenForo_Application::set('page_start_time', $startTime);

    $fc = new XenForo_FrontController(new XenForo_Dependencies_Public());
    $fc->run();

    and another link gave me the following:
    <?php

    $startTime = microtime(true);
    $fileDir = dirname(__FILE__);
    $rootPath = realpath($fileDir . '/..');
    chdir($rootPath);

    require($rootPath . '/library/XenForo/Autoloader.php');
    XenForo_Autoloader::getInstance()->setupAutoloader($rootPath . '/library');

    XenForo_Application::initialize($rootPath . '/library', $rootPath, false);
    XenForo_Application::set('page_start_time', $startTime);

    XenForo_Phrase::setPhrases(require($fileDir . '/language_en.php'));
    XenForo_Template_Install::setFilePath($fileDir . '/templates');

    $fc = new XenForo_FrontController(new XenForo_Dependencies_Install());
    $fc->run();
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    That would suggest PHP isn't being run.
     
  9. Samus4145

    Samus4145 Member

    Okay. so how do I go about fixing this? Nothing has changed on the hosting/site side of things besides trying to upgrade the xenforo installation.

    edit: Looking into the files, it looks like the backup has a TON of old files in it. The host must merge and not replace folders per backup so there are a whole bunch of old folders in the library and styles that shouldn't there.
     
    Last edited: Mar 21, 2014
  10. Mike

    Mike XenForo Developer Staff Member

    I'd have to suggest contacting your host if PHP doesn't appear to be run -- it's usually indicative of a server misconfiguration, especially if it was working previously.
     
  11. Samus4145

    Samus4145 Member

    Well that's odd that server side would change when the only thing adjusted was xenforo install, but I'll contact them. If I have to replace all the files with a fresh 1.3, do I lose all users, posts and child themes?
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    If you still have your database, /data and /internal_data directories then it is completely recoverable.
     
  13. Samus4145

    Samus4145 Member

    So I can't replace the data and internal_data directories or you referring to them on the database and not the folders in the upload folder to replace?
     
  14. Samus4145

    Samus4145 Member

  15. Brogan

    Brogan XenForo Moderator Staff Member

    Everything is stored in the database except for avatars and attachments which are stored in /data and /internal_data.
    If you still have those and your database then your site can still be restored.
     
  16. Samus4145

    Samus4145 Member

    Deleted the old Forums folder since obviously something is broken in it.

    Uploaded a full 1.3 and I am able to launch the install, BUT it says I have to wipe out the database to install including posts and users.

    "You cannot proceed unless all XenForo database tables are removed."
     
  17. Brogan

    Brogan XenForo Moderator Staff Member

    What is the status of the config.php and install_lock.php files?
    It sounds like they are still missing.

    Also, uploading the full .zip may have removed your /data and /internal_data directories.
    Double check they are still there.
     
  18. Samus4145

    Samus4145 Member

    I originally tried doing the upgrade again but that didn't work.

    I uploaded the config file that we had before, and replaced the data and internal_data folders. There are no forums listed and the login system is completely broken.
     
  19. Samus4145

    Samus4145 Member

    It's possible that 1.3 is not compatible with Xenscripts which we use to power wordpress login with xenforo, but even with that disabled we aren't able to log in just to the forum side.

    edit: noticed if I try and change style it says the board is being upgraded. Hmm, let me see if I can finally run the install and maybe it will take this time.

    double edit: And we are back in business!

    To summarize: Upgrade for 1.3 completely broke the site. Had to use full install for 1.3 and use the old config, install_lock.php files and replace the data and internal_data directories. After that, I had to re-run the install to actually upgrade to 1.3, even though the files are 1.3.

    Re-installed my xenforo to wordpress plugin and log ins are working correctly and forums have been repopulated.
     
    Last edited: Mar 22, 2014
  20. Brogan

    Brogan XenForo Moderator Staff Member

    For anyone else reading this, using the full .zip to upgrade an existing site is a bad idea, for the reasons mentioned.
    The upgrade .zip must be used.

    The upgrade instructions are here: http://xenforo.com/help/upgrades/
    As long as your FTP application is set to merge and those instructions are followed, you will have no problem.
     

Share This Page