XF 2.2 XF 2.1.10 to 2.2.0 Upgrade failed......

DarkGizmo

Well-known member
I did a test upgrade and while the upgrade process was going through it spat out this error at me......Not sure what went wrong here? It gets to rebuilding the masta data templates to around 95% before it hits me with this error:

XF\Db\Exception: MySQL statement prepare error [1146]: Table 'revillu2_beta.xf_widget_definition' doesn't exist in src/XF/Db/AbstractStatement.php at line 228
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
  5. XF\Db\AbstractAdapter->query() in src/XF/Mvc/Entity/Finder.php at line 1379
  6. XF\Mvc\Entity\Finder->fetch() in src/XF/Mvc/Entity/Manager.php at line 212
  7. XF\Mvc\Entity\Manager->findByIds() in src/XF/AddOn/DataType/AbstractDataType.php at line 314
  8. XF\AddOn\DataType\AbstractDataType->findByIds() in src/XF/AddOn/DataType/WidgetDefinition.php at line 53
  9. XF\AddOn\DataType\WidgetDefinition->importAddOnData() in src/XF/Job/AddOnData.php at line 110
  10. XF\Job\AddOnData->run() in src/XF/Job/Atomic.php at line 38
  11. XF\Job\Atomic->run() in src/XF/Job/Manager.php at line 258
  12. XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 200
  13. XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 151
  14. XF\Job\Manager->runUnique() in src/XF/Install/Controller/AbstractController.php at line 24
  15. XF\Install\Controller\AbstractController->manualJobRunner() in src/XF/Install/Controller/Upgrade.php at line 262
  16. XF\Install\Controller\Upgrade->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 350
  17. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
  18. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
  19. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
  20. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2300
  21. XF\App->run() in src/XF.php at line 464
  22. XF::runApp() in install/index.php at line 14


Any help would be appreciated. Also, I upgraded via uploading files and overwritng them, not via the admin CP.
 
Last edited:
Solution
How exactly are you dumping?

Are you manually selecting all of the tables?

Be aware that if you are using the main page in phpMyAdmin, there are some tables on a second page.

1601660399208.png

Using a proper export or dump command (which is what you should be using) won't be affected by that though.
The error suggests one of the core tables is missing.

That would also have been an issue with the version you were already running - 2.1.10.

Did you uninstall any add-ons or do anything else before upgrading to 2.2?
 
No i didn't. I disabled add-on listeners after I experienced this issue. I'm not sure what to do to fix this? I got a lot of add-ons installed but I really don't know what to do to fix this. I mean i've uninstalled add-ons in the past but nothing recently prior to this upgrade?

How would I go about fixing this? or am I destined to stay on 2.1.10?
 
So is this for your current production site which is currently at 2.2.11, or a test site?

If the latter, then I suspect the dump and restore you did to create the test site did not work correctly and that table was already missing before you attempted the upgrade.

Use SSH if you can - phpMyAdmin isn't the best when it comes to dumping and restoring.
 
Says this:

Code event listeners and extensions have been disabled via config.php. This is designed as an emergency measure to allow you to regain access to the control panel if an add-on blocks access and disable it. This should not be used as a debugging tool.

Revillution - Your portal to entertainment!​

The site is currently being upgraded. Please check back later.
 
It seems like there are multiple issues at play here.

Your production site is not being upgraded -- it's accessible -- so there must be some conflict with the test site you have set up.

If the xf_widget_definition table is really missing from your production site then that would definitely throw an error when navigating to admin.php?widgets/ in the ACP.

Run this query against the production site database, and the test site database.

SQL:
show create table xf_widget_definition
 
it said it was successfully run in PHPMyAdmin? How would I 'test the site database'? What exactly should happen?

and on my production site, I can access the widgets page fine without issue.....the site itself runs fine, so i'm not sure.
 
Okay, so in the live production site, it worked, but on the test one, it said it didn't exist. So that's the issue then.....so shuld I wipe the beta database and try again?
 
I just tried copying the database, it seemed to have gone through successfully, but when I try to show the table in the 'beta' database, it still says it doesn't exist. I'm absolutely baffled.......
 
How exactly are you dumping?

Are you manually selecting all of the tables?

Be aware that if you are using the main page in phpMyAdmin, there are some tables on a second page.

1601660399208.png

Using a proper export or dump command (which is what you should be using) won't be affected by that though.
 
Solution
I'm selecting "Check All" then hitting "Copy" (I was hitting "Export" then manually importing the .sql file into the new DB) but i tried Copy and it still gives me the same issue......


@Brogan , I found that the test database was missing it's 2nd page, meaning it was missing all the tables on the 2nd page from the live database, i simply copied this over, gonna perform another test upgrade now.
 
Last edited:
Top Bottom