• 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.

Junior

Well-known member
#1
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:
Code:
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
 
F

Floris

Guest
#2
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.
 

Junior

Well-known member
#3
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.
I'll tell the hundreds of users online to not load the site for 10minutes :p Thanks problem solved.
 

Carlos

Well-known member
#7
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...
 

Junior

Well-known member
#8
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...
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.
 

gldtn

Well-known member
#9
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!
 

Carlos

Well-known member
#10
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.
You're not alone, I thought the same exact thing.
 

Dodgeboard

Well-known member
#11
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.
 

Mike

XenForo developer
Staff member
#12
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.
 

JVCode

Well-known member
#13
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.
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.
 

Junior

Well-known member
#14
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.
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.

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.
Or more so an unpreventable error.
 

chrisj

Active member
#15
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.
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.
 

Mike

XenForo developer
Staff member
#16
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).
 

Junior

Well-known member
#17
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).
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)?
 

Cezz

Well-known member
#18
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)?
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!