I used the "one-click upgrade" when the upgrade was triggered. I have completed one-click upgrades successfully before.
The site was stuck in maintenance mode and was not usable. I have fixed the issue for now by "downgrading" to 2.2.8 via manually uploading the files.
I'm not sure the upgrade actually completed as it's still showing 2.2.8 in the Admin panel, and the "file health check" shows everything is healthy. My staging environment completed the one-click upgrade without any issues.
This is highly confusing because, to the best of our knowledge, no one else has run into this and the code is clear:
PHP:
$this->executeUpgradeQuery(
'UPDATE xf_image_proxy
SET pruned = ?,
file_hash = ?
WHERE fetch_date > ?',
[1, '', $upgradeDate]
);
There are three ? placeholders in the query and three values passed in (1 and empty string and $upgradeDate).
This error would happen if there were more or fewer ? placeholders than values passed in.
Is there anything particularly notable about your MySQL set up? Which version of MySQL are you using? (Or MariaDB etc version)?
This may be something we need to have a closer look at, so please feel free to submit a ticket, but honestly I don't really know what I'll be looking for yet!
Yeah, the error does not make any sense. I checked the query that defines $upgradeDate and it does return the expected date:
Code:
> select completion_date from xf_upgrade_log where version_id = '2020870';
+-----------------+
| completion_date |
+-----------------+
| 1639294069 |
+-----------------+
1 row in set (0.000 sec)
I'm running MariaDB version 10.4.22 in a standard configuration on a dedicated server configured with @eva2000's Centminmod. PHP version 8.0.13.
I will do more of my own debugging with the code to see if I can provide any additional information before troubling you with a ticket. Something feels "off" here.