Dear @all and @llaumgui .
I am an old Administrator/Moderator of https://www.fedoraonline.it (The Italian Fedora Forum). @llaumgui you help us (me and Robyduck) a lot of years ago to update our website (to fluxbb). I leave fedoraonline.it time ago for personal reason (new job, no time, etc.) but I continue to study php and website.
And I create a new motorbike community (https://www.theroyals.it) based on fluxbb over 10 years ago.
Now I need to migrate to flarum. I have over 5k users, over 230k posts . So I decide to update the importer of archlinux-de community (also to understand better the flarum coding).
I fork the project here: https://github.com/marionline/flarum-import-fluxbb
I update something (example I use fluxbb config to connect to fluxbb database and import it) and fix some errors I encountered. The work is not finished yet.
I have a question that I don't understand how to resolve. I am updating the posts import process.
It is managed by the src/Importer/Posts.php
file.
It is strange because if I don't remove that line (line 261 more or less):
261 $formatter->addConfigurationCallback(ContainerUtil::wrapCallback(ConfigureMentions::class, $this->container));
I have this issue:
PHP Fatal error: Uncaught TypeError: Flarum\Mentions\ConfigureMentions::addUserId(): Argument #2 ($mentions) must be of type array, null given in /forum/vendor/flarum/mentions/src/ConfigureMentions.php:96
If I remove the line no error. Why?
I try also to flush()
the formatter in convertPostContent()
function but after some conversion (near 35, I don't know why at 35 and not 25 or 100 posts) same error above.
Any suggestions are appreciated. Thank you!