Fixed v2.3.5 Upgrade Error on Step 8 Data too long for column 'provider_metadata'

robdog

Well-known member
Affected version
2.3.5
Here is the error I am getting in the CLI:

MySQL query error [1406]: Data too long for column 'provider_metadata' at row 1

UPDATE xf_purchase_request SET provider_metadata = ? WHERE purchase_request_id = ?

Let me know if you need any other information about this error.
 
Cool :) You bumped into an issue we didn't hit during testing.

For now run this query:

Code:
ALTER TABLE `xf_purchase_request`MODIFY `provider_metadata` VARBINARY(500) DEFAULT NULL;

Then restart the upgrade and it should continue where it left off.
 
Got this error also when upgrading:

XF\Db\Exception: MySQL query error [1406]: Data too long for column 'provider_metadata' at row 1 in src/XF/Db/AbstractStatement.php at line 230
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 207
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 83
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 323
XF\Db\AbstractAdapter->update() in src/XF/Install/Upgrade/2030570-235.php at line 248
XF\Install\Upgrade\Version2030570->step8() in src/XF/Install/Controller/Upgrade.php at line 192
XF\Install\Controller\Upgrade->actionRun() in src/XF/Mvc/Dispatcher.php at line 362
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
XF\App->run() in src/XF.php at line 806
XF::runApp() in install/index.php at line 16
 
Well, the solution is the same.

Run the query. Restart the upgrade. If you're using the web UI you can just go to your install URL directly: <your_url>/install/
 
The download package has been patched.

If you haven't run into this error, no further action is required.

If you have already downloaded and run into the issue, run the query here and restart the upgrade:

 
Despite running the query and having the latest version manually uploaded and deployed, I still get the error?
I already have data in the provider_metadata columns, not sure if that's an issue?

1738274512084.webp
1738274521873.webp

1738318416721.webp
 
Last edited:
A very radical fix for me was:
  • Drop xf_purchase_request table
  • Run the cmd.php xf:repair-db command which recreate the table
This will continue the install process, but all the data in that table is lost, what does this have as consequences?
 
I'm not sure I would have done that and if you're able to get the contents back from a previous backup I would highly recommend it.

What you have done now is essentially erased any of your user's purchase history. For the most part that shouldn't pose a significant issue, but if one of the things you over is recurring payments, you will now find that XenForo probably can't associate new payments with the correct user upgrade. Meaning they will be paying for user upgrades but they won't be getting them assigned automatically and you'll probably have to either process them manually (forever) or ask them to cancel and resubscribe.

Even if you can restore the "broken" version of the table, that would be highly preferable and we might be able to guide you through that or figure the problem out via ticket support.
 
I'm not sure I would have done that and if you're able to get the contents back from a previous backup I would highly recommend it.

What you have done now is essentially erased any of your user's purchase history. For the most part that shouldn't pose a significant issue, but if one of the things you over is recurring payments, you will now find that XenForo probably can't associate new payments with the correct user upgrade. Meaning they will be paying for user upgrades but they won't be getting them assigned automatically and you'll probably have to either process them manually (forever) or ask them to cancel and resubscribe.

Even if you can restore the "broken" version of the table, that would be highly preferable and we might be able to guide you through that or figure the problem out via ticket support.

Yeah I can setup an environment for debugging, there is a backup of the exact moment where the upgrade process got stuck. I'll set that up later this weekend and update the support ticket.
 
I've run the query in phpmyadmin, restarted the process and got the same error

XF\Db\Exception: MySQL query error [1406]: Data too long for column 'provider_metadata' at row 1 in src/XF/Db/AbstractStatement.php at line 230
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 207
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 86
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 324
  5. XF\Db\AbstractAdapter->update() in src/XF/Install/Upgrade/2030570-235.php at line 253
  6. XF\Install\Upgrade\Version2030570->step8() in src/XF/Install/Controller/Upgrade.php at line 192
  7. XF\Install\Controller\Upgrade->actionRun() in src/XF/Mvc/Dispatcher.php at line 362
  8. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 265
  9. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
  10. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
  11. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
  12. XF\App->run() in src/XF.php at line 806
  13. XF::runApp() in install/index.php at line 16
What can I do @Chris D
 
In previous cases I still believe customers had updated the wrong database or something along those lines. I'm yet to see a logical reason why the error would persist. That field should only ever contain a small amount of data that doesn't exceed 500 characters.
 
We'd likely need access to the forum database, the upgrade system and the file system so we can investigate.
 
Back
Top Bottom