MichaelBelgium / mybb_to_flarum

A Flarum extension to convert a mybb forum to a fresh flarum install
MIT License
26 stars 15 forks source link

CLI Crash : Uncaught Error: Call to a member function refreshCommentCount() #29

Open redfish462 opened 2 years ago

redfish462 commented 2 years ago

Hello,

I tried to run the script via CLI but while importing discussions the script crashed. I don't know what the cause is.


PHP Fatal error:  Uncaught Error: Call to a member function refreshCommentCount() on null in /flarum/vendor/michaelbelgium/mybb-to-flarum/src/Migrator.php:298
Stack trace:
#0 /flarum/vendor/michaelbelgium/mybb-to-flarum/src/Commands/MybbToFlarumCommand.php(97): Michaelbelgium\Mybbtoflarum\Migrator->migrateDiscussions()
#1 /flarum/vendor/flarum/core/src/Console/AbstractCommand.php(37): Michaelbelgium\Mybbtoflarum\Commands\MybbToFlarumCommand->fire()
#2 /flarum/vendor/symfony/console/Command/Command.php(298): Flarum\Console\AbstractCommand->execute()
#3 /flarum/vendor/symfony/console/Application.php(1033): Symfony\Component\Console\Command\Command->run()
#4 /flarum/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
#5 /flarum/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#6 /flarum/vendor/flarum/core/sr in /flarum/vendor/michaelbelgium/mybb-to-flarum/src/Migrator.php on line 298```
MichaelBelgium commented 2 years ago

That's so strange, can you check in your MyBB posts table if there's any row with 0 as uid ?