XF 2.0 LogicException: xf_widget already exists, but the structure does not match. (During 1.5 -> 2.0 upgrade)

Static-Xbox

Well-known member
Hey,

Trying to upgrade my test install to 2.0b1, but after clicking the upgrade button, I get the following error:

LogicException: xf_widget already exists, but the structure does not match. in src/XF/Db/Schema/Create.php at line 51

  1. XF\Db\Schema\Create->getQuery() in src/XF/Db/Schema/AbstractDdl.php at line 132
  2. XF\Db\Schema\AbstractDdl->apply() in src/XF/Db/SchemaManager.php at line 171
  3. XF\Db\SchemaManager->createTable() in src/XF/Install/Upgrade/2000010-200a.php at line 446
  4. XF\Install\Upgrade\Version2000010->step3() in src/XF/Install/Controller/Upgrade.php at line 152
  5. XF\Install\Controller\Upgrade->actionRun() in src/XF/Mvc/Dispatcher.php at line 232
  6. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 85
  7. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  8. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1771
  9. XF\App->run() in src/XF.php at line 319
  10. XF::runApp() in install/index.php at line 14

Not entirely sure on the next step from here, any help would be greatly appreciated!

(1.5.12 -> 2.0b1)
 
Do you have an existing add on which adds widgets? Which add on and which version is it? I’m not certain it’s Wisgwt Framework as I think that names its tables correctly iirc.
 
Upgrading via CLI and got the same error: xf_widget already exists, but the structure does not match.

I have previously installed [bd] Widget Framework (although it has been disabled for some time). Never used XenPorta.
 
It appears that the widget framework causes a conflict with the upgrade. Looking at the tables here, the other table has a prefix, but xf_widget doesn't.
 
Considering that Widget Framework isn't going to work after the upgrade, is there a workaround to remove or replace the table for an upgrade in progress? Would dropping the table and running the upgrade again potentially solve the issue?
 
If you aren't going to use an add-on after upgrading, it's strongly recommended that you uninstall it before upgrading. Otherwise, you're very likely to leave orphaned data.
 
No, they will be disabled automatically. That's independent from add-ons that conflict with the upgrade though -- those would need to be uninstalled (or a patched version of them will need to be released and installed before upgrading).
 
Hey,

Trying to upgrade my test install to 2.0b1, but after clicking the upgrade button, I get the following error:

LogicException: xf_widget already exists, but the structure does not match. in src/XF/Db/Schema/Create.php at line 51

  1. XF\Db\Schema\Create->getQuery() in src/XF/Db/Schema/AbstractDdl.php at line 132
  2. XF\Db\Schema\AbstractDdl->apply() in src/XF/Db/SchemaManager.php at line 171
  3. XF\Db\SchemaManager->createTable() in src/XF/Install/Upgrade/2000010-200a.php at line 446
  4. XF\Install\Upgrade\Version2000010->step3() in src/XF/Install/Controller/Upgrade.php at line 152
  5. XF\Install\Controller\Upgrade->actionRun() in src/XF/Mvc/Dispatcher.php at line 232
  6. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 85
  7. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  8. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1771
  9. XF\App->run() in src/XF.php at line 319
  10. XF::runApp() in install/index.php at line 14

Not entirely sure on the next step from here, any help would be greatly appreciated!

(1.5.12 -> 2.0b1)

Sorry for the legacy table name. It's best to uninstall the add-on before attempting to upgrade to XenForo 2.
 
I just ran into the same issue with widget framework.

Code:
Running upgrade to 2.0.0 Alpha, step 1... done.
Running upgrade to 2.0.0 Alpha, step 2... done.
Running upgrade to 2.0.0 Alpha, step 3...
                                                              
  [LogicException]                                             
  xf_widget already exists, but the structure does not match.
Let's start over again. :coffee:
 
I just ran into the same issue with widget framework.

Code:
Running upgrade to 2.0.0 Alpha, step 1... done.
Running upgrade to 2.0.0 Alpha, step 2... done.
Running upgrade to 2.0.0 Alpha, step 3...
                                                              
  [LogicException]                                             
  xf_widget already exists, but the structure does not match.
Let's start over again. :coffee:
Actually you don't need to. Just do a rename and run cmd.php again.

Code:
RENAME TABLE xf_widget TO _xf1_xf_widget;

Or just drop it.
 
I also had to drop xf_upgrade_job because this error.

Code:
 [LogicException]                                                
  xf_upgrade_job already exists, but the structure does not match.

If you drop it it works.
Upgrade complete. :cool:
 
In my case I decided to wipe, re-install everything on the test site, remove the Widget Framework and then run the upgrade. Everything went as smooth as silk.

Thanks so much for the help :)
 
Top Bottom