After setting the composer.json file to "minimum-stability": "dev",
the waterhole/import was installed successfully.
But I am unable to enter user data at all. Can I check the log to provide further assistance?
The same goes for a blank database.
9 Comments
Hi @Subarist,
I've just pushed a couple of fixes to user importing. Please make sure the version constraint for the
waterhole/import
package incomposer.json
is set to*
or0.1.x-dev
, and then runcomposer update
to pull in the changes, then try running the import again.The groups error indicates your database already has some data in it. Per the docs, make sure you're running this on a fresh Waterhole installation, before the
waterhole:install
command has been run.When set to 0.1.x-dev, the update was successful.
Now stuck at "Importing 537738 comments..."
Does the progress bar ever move beyond zero? Do you mind pasting a sample of your Flarum comment data for the failing comments (specifically the
content
column) here, or email it to toby@waterhole.dev?In fact, I noticed that the the database is changing.
The progress bar is also increasing.
So, I have decided to let it run until completion and see what happens.
I think it will take some time.
After approximately 40 mins, it was completed.
Comparison to the size of the data table, it appears that there are many missing entries.
flarum:
waterhole :
flarum_posts & waterhole_comment :
User data was entered, but unable to log in. Is it necessary to change the password?
It looks like many of the posts in your Flarum table contain closing
</br>
tags, in the absence of an opening<br>
tag. This is invalid XML and doesn't make sense – they should be self-closing<br/>
tags.content
of one of these posts?A possible fix may be to run a find & replace on your Flarum posts table, replacing
</br>
with<br/>
, and then try running the import again.Yes, user passwords will need to be reset.
My database is integrated with PHPBB and DISCUZ, and it contains many outdated or customized code syntax.
After several rounds of merging and migrating to FLARUM, there may be some issues.
Now, following the hint, I replaced "</br>" with "<br/>":
Currently, no errors are being thrown, and I think we will know in 40 minutes...
Note: The configuration and execution of the conversion process itself are actually quite simple.
In my case, the data specification of the database is quite messy, which resulted in continuous errors during the conversion (phpbb & discuz) process.
The reason is that the content of the database fails the "isValidXML" check.
I tried replacing obvious syntax errors in the database, such as "</br>" and "<br/>" as mentioned earlier.
However, dealing with these issues in over 50K articles proved to be too difficult. The variety of non-compliant code drove me crazy.
Another consideration is that after modifying the database, many older articles will lose their distinctive bbcode? features (which are still presented uniquely on Flarum).
Approximately 99.99% of the entire database consists of articles in this peculiar format, and there are very few newly generated articles after migrating to Flarum. So, I decided to try skipping the check and directly import all the data.
After the import was completed, I discovered that most of the articles only had titles in their first posts, losing the main content. It was then that I realized that due to the conversion from phpbb & discuz to Flarum, there might be some differences in the formatting of the old conversion program. As a result, all my discussions were missing the "first_post_id," which is crucial for the new style of display in Waterhole. However, it appears normal in Flarum because the hero title is present, followed by the posts.
Just when I was about to give up, ChatGPT suggested that I try rebuilding the "first_post_id":
After several hours of hardship, various attempts, and encountering errors, I have achieved some results that I hope won't pose major issues. Now, I can start verifying the other functionalities.
中文測試需求< -- pointless, just to test the UTF8 search ability
Migrations can be so painful! Nice job working through the issues here @Subarist.
It would be quite trivial to write an extension to enable BBCode on Waterhole - it uses the same formatting library under the hood as Flarum.