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

Design Issue Unexpected database error while upgrading.

Discussion in 'Resolved Bug Reports' started by Junior, Oct 6, 2011.

  1. Junior

    Junior Well-Known Member

    At first it displays the forum is being upgraded message but shortly after it starts displaying: An unexpected database error occurred. Please try again later. This happens while files are being uploaded and until upgrade is started. Tested this on both a very large and small forum with the same results.

    admin.php is accessible throughout this process.

    Upgrading from Xenforo 1.0.4 to 1.1 beta

    During upgrade the following error is showed instead:
    Fatal error: Call to undefined method XenForo_Template_Helper_Core::avatarhtml() in /home//public_html/library/XenForo/Template/Abstract.php(262) : eval()'d code on line 579
  2. Floris

    Floris Guest

    Shouldn't load the forum while it's doing an upgrade.
    1.0 to 1.1 is still significant. At some point it just needs to complete the upgrade in order to .. complete the upgrade so it works on teh front-end for everybody.
  3. Junior

    Junior Well-Known Member

    I'll tell the hundreds of users online to not load the site for 10minutes :p Thanks problem solved.
  4. Floris

    Floris Guest

    It's a beta, should not be run in a production environment.
  5. Junior

    Junior Well-Known Member

    Sorry for reporting a bug :p I'll stop testing the beta so the final has the issue.
  6. Floris

    Floris Guest

    I was just explaining what I think it might be.
  7. Carlos

    Carlos Well-Known Member

    What solved it for me is actually upgrading the software from the browser side. I too checked the site while overwriting the files on FTP...
  8. Junior

    Junior Well-Known Member

    Yuh about mid way through the actual upgrade, browser side, the error goes away and the "forum is being upgrade" message appears. There was never an error before so I'm reporting it.
  9. gldtn

    gldtn Well-Known Member

    I upgraded my live site with no problems :eek: , but even though Xenforo automatically closes the forum I would suggest to close it first yourself.. disable all add-ons and than give it a go!
  10. Carlos

    Carlos Well-Known Member

    You're not alone, I thought the same exact thing.
  11. Dodgeboard

    Dodgeboard Well-Known Member

    Same here. I thought that was one of the things that Kier liked about the install process...the automatic opening/closing. I had the same problem with pages and pages of errors. Glad you reported it. That's what we are supposed to do, report bugs when we find them, even if they turn out not to be bugs in the devs opinions.
    JVCode likes this.
  12. Mike

    Mike XenForo Developer Staff Member

    As mentioned, we do try to close the board -- and that will generally work. But when doing a major upgrade, we really can't guarantee it. There will be data missing all over the place. The avatarHtml error is a good example as it's a fatal error and can't be caught. (On a side note, on a production server, you probably shouldn't have display_errors on :))

    I would recommend closing off access to your board during an upgrade, particularly with large ones.
  13. JVCode

    JVCode Well-Known Member

    Couldn't agree more. Even though most of the time I get it wrong and turns out to be "as designed" hehehe, Oh well, atleast I try to help.
  14. Junior

    Junior Well-Known Member

    Sounds about right and works for me. Just seeing if it wasn't fixable for the future. I'll be sure to have the board off instead of taking advantage of the auto closer. I didn't know it would change much.

    Thanks Mike.

    Or more so an unpreventable error.
  15. chrisj

    chrisj Active Member

    Do you mean modifying apache/nginx config to not publicly serve the xenforo files while you upgrade or do you mean just setting the board to be off.
  16. Mike

    Mike XenForo Developer Staff Member

    I have a non-perfect workaround in place now that will reduce the frequency of this, but it can still happen.

    I was talking about using something to block access to XF's scripts while the upgrade is pending - that's what we do here (inside index.php). XF does something like that, but there are quite a lot of things that can be initialized before our version check code can be run (given that we have to allow admins past it).
  17. Junior

    Junior Well-Known Member

    Somewhat of a related question. If I choose to close the forums then begin an upgrade - will the Upgrade is in progress page still appear or will just the forum is closed message stay?

    Also if I close the forum, will this prevent any errors from showing while upgrading (should it be a big upgrade such as this)?
  18. Cezz

    Cezz Well-Known Member

    A Better way to deal with it would be to add a line to your .htaccess that forwards all traffic to a static HTML page (except for your IP) just before you start the upgrade, once you are happy with it remove that line!
  19. kkm323

    kkm323 Well-Known Member

    I am visiting XF 24/7 and they never close the forum for any update ?!

Share This Page