Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fluxbb1.5.11 import - step 9 fail - Integrity constraint violation: #1

Open
Elementtair opened this issue Nov 29, 2024 · 6 comments
Open

Comments

@Elementtair
Copy link
Contributor

Hi,

Tried your tool for migrating a 1.5.11 forum where i put my datas, and it didn't passed step 9, fails after a minute or so.

Don't understand cause I don't see any null forum_id in my topics table.

PHP OTHER_ERROR: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'forum_id' cannot be null in ...\app\Core\DB.php:[320]

Trace:

...\app\Models\Transformer\Driver\AbstractDriver.php(397): ForkBB\Core\DB->exec(string)
...\app\Models\Transformer\Transformer.php(182): ForkBB\Models\Transformer\Driver\AbstractDriver->topicsEnd(object{ForkBB\Core\DB})
...\app\Models\Pages\Admin\Install.php(400): ForkBB\Models\Transformer\Transformer->step(integer, integer)
...\app\Controllers\Install.php(89): ForkBB\Models\Pages\Admin\Install->step(array(3), string)
...\app\Core\Container.php(117): ForkBB\Controllers\Install->routing()
...\app\bootstrap.php(81): ForkBB\Core\Container->__get(string)
...\index.php(14): require(string)

@MioVisman
Copy link
Member

Request containing the problem: https://github.com/forkbb/transformer/blob/main/app/Models/Transformer/Driver/AbstractDriver.php#L389-L395

Is everything ok in the forums table?
In the topics table, maybe there is a topic with a forum_id of a non-existent forum?

@Elementtair
Copy link
Contributor Author

Seems to be something like that ! Thanks !

Made a first round of cleaning, and it went trough until step 10 before it breaks again.

Second round of cleaning made it possible to go until step 16, now I get

PHP OTHER_ERROR: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null in ...\app\Core\DB\DBStatement.php:[94]

Trace:

...\app\Core\DB.php(339): ForkBB\Core\DB\DBStatement->execute(array(2))
...\app\Models\Transformer\Driver\AbstractDriver.php(753): ForkBB\Core\DB->exec(string, array(2))
...\app\Models\Transformer\Transformer.php(172): ForkBB\Models\Transformer\Driver\AbstractDriver->topic_subscriptionsSet(object{ForkBB\Core\DB}, array(2))
...\app\Models\Pages\Admin\Install.php(400): ForkBB\Models\Transformer\Transformer->step(integer, integer)
...\app\Controllers\Install.php(89): ForkBB\Models\Pages\Admin\Install->step(array(3), string)
...\app\Core\Container.php(117): ForkBB\Controllers\Install->routing()
...\app\bootstrap.php(81): ForkBB\Core\Container->__get(string)
...\index.php(14): require(string)

Some more cleaning to do...

Do you have a way to clean the mess ? I used this plugin but it seems to need some care ... I'll look further into it.

AP_Nettoyage.zip

@Elementtair
Copy link
Contributor Author

Ok, then after two rounds on cleaning orphans wtih the plugin above, and wiping the forum_subscriptions table,

the script successfuly went to his end.

I then ran into two other troubles :

  • censorship was activated in my configuration and seems not to be working.
  • I can't log in the forum : my password is not recognised, and the link to change the password doen't work either. The link provided in the mail lead to a page which says " bad request. Request contain invalid data" . Same for registering.

@Elementtair
Copy link
Contributor Author

Elementtair commented Nov 30, 2024

For now, I just copied my password from an original installation of forkbb and it worked !

Well... almost ! The user timezone was not the right one, was still a DST with a number.

Correcting this and I m in a working ForkBB import !!

Will see later if I can find why this password thing is not working as it should.

@MioVisman
Copy link
Member

FluxBB and ForkBB have different password hashing algorithms, so after conversion the old password will no longer work in ForkBB.

DST was completely removed in one of the ForkBB revisions, so all forum users need to re-configure their profile after conversion.

P.S. Some nuances will need to be corrected in the code later.

@Elementtair
Copy link
Contributor Author

  • For the forkbb password, I don't understand from where the issue is : because of the different hashing the password has to be reset, that's ok, but I can't reset the password by mail (as said previously, it's not working)

  • For the timezone, it makes ForkBB crash, so I think the easiest will be to default to UTC.

I'll submit issues or code when I'll have more understanding of what's happening:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants