Closed XF\Db\InvalidQueryException: MySQL statement prepare error [1176]: Key 'PRIMARY' doesn't exist in table 'topics' in src/XF/Db/AbstractStatement.php at

Vintage175

New member
Affected version
2.2.15
Hi All,

New to XenForo, attempting to import SMF forum to XenForo and received this error:

XF\Db\InvalidQueryException: MySQL statement prepare error [1176]: Key 'PRIMARY' doesn't exist in table 'topics' in src/XF/Db/AbstractStatement.php at line 230
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 40
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 56
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  5. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 167
  6. XF\Db\AbstractAdapter->fetchAllKeyed() in src/addons/XFI/Import/Importer/SMF.php at line 1258
  7. XFI\Import\Importer\SMF->stepThreads() in src/XF/Import/Runner.php at line 244
  8. XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 61
  9. XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 234
  10. XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 352
  11. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 258
  12. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  13. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  14. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
  15. XF\App->run() in src/XF.php at line 524
  16. XF::runApp() in admin.php at line 13

-------------

Additional detail of error attached (screenshots).

Any assistance in how to overcome this would be much appreciated.

Thank you.
 

Attachments

  • Screenshot 2024-06-26 at 6.24.14 PM.webp
    Screenshot 2024-06-26 at 6.24.14 PM.webp
    72.6 KB · Views: 11
  • Screenshot 2024-06-26 at 6.24.53 PM.webp
    Screenshot 2024-06-26 at 6.24.53 PM.webp
    13 KB · Views: 11
  • Screenshot 2024-06-26 at 6.25.16 PM.webp
    Screenshot 2024-06-26 at 6.25.16 PM.webp
    15.9 KB · Views: 11
Automated triage: Not a bug

Thank you for reporting this issue. This error means the topics table in your source SMF database has no primary key. A standard SMF install has one, so the source database's structure has been damaged or changed. This report is also old and nothing recent confirms it. If it still happens on the current version with a source database that has its standard keys, please open a new report.

This is an automated assessment. A member of staff may review and update it.
 
Back
Top Bottom