XF 1.2 Updating from 1.2.1 to 1.2.2

Ark Royal

Active member
I am doing a test update and was suprised to get the following displayed


Capture.webp
Have I done something wrong or is it normal for all existing posts to be wiped when updating?
I have double and triple checked that I have downloaded the upgrade and not the full installation but it is only 2KB smaller???
 
There are 2 files that are checked here: library/config.php and internal_data/install-lock.php. If they're not available, it will assume you're doing a new install.


The file did exist as when trying Mikes suggestion that If you go to <url>/install/index.php?upgrade/ that may suffice I was told that the installation was already complete and to delete the file if I wanted to install again.
Actually that message indicates that both files exist and it prevents you from continuing with the install. If that's happening, then it may just indicate that your browser has cached the upgrade page result. You may want to try a different one.

However, the fact that this happened indicates that one of those two files was removed -- if you had to re-enter your config data to get to that screenshot then I have to imagine that it was config.php (though conversely, when that file got created, if install-lock.php still existed, it should have locked you out of the install...).
 
Well things went better this evening in that an upgrade was attempted but I got this message displayed
Fatal error: Call to undefined method XenForo_Model_AddOn::getAllUpdateChecks() in /var/sites/t/XXXXXXX.co.uk/public_html/Testing/library/AddOnInstaller/CronEntry/UpdateCheck.php on line 11
 
Well things went better this evening in that an upgrade was attempted but I got this message displayed
Fatal error: Call to undefined method XenForo_Model_AddOn::getAllUpdateChecks() in /var/sites/t/XXXXXXX.co.uk/public_html/Testing/library/AddOnInstaller/CronEntry/UpdateCheck.php on line 11

Just update Chris' add on installer and you should be fine.
 
It is the latest version.
To me it looks like Chris is saying the addon is trying to run a cron job whilst the upgrade is taking place, which causes the error??


I'm a bit confused about that error.
I'm not sure what triggers it. It loads on the Upgrade Complete page. So I can tell you that the Uograde definitely worked!
But why is that function being called? It exists, but presumably listeners are disabled during upgrades. Thus the error. That function is called usually in a Cron Entry.
@Mike: do Cron entries run during or at the end of the upgrade completing? If so I think something should prevent add on Crons from running while listeners are disabled during the upgrade process.
 
Yeah I'm surprised this keeps coming up.

It's almost as if Cron entries, including those from add-ons, are allowed to run before the Code Event Listeners are re-enabled.
 
Hmm, I swore I had taken that out for 1.2.1 but it appears not...

The upgrade system did actually trigger any automatic deferred tasks at the end. As the upgrade system doesn't run in the same context, that's what causes the issue. I've taken it back out for 1.2.3.
 
Top Bottom