Codoforum related discussions
No posts or categories visible after migration

Hey there,

I've got an old BBPress 1.x forum that's still running on PHP 5.6 and thus needs to be replaced rather sooner than later. smile

Codoforum seems like a perfect (read: much better) replacement, so I started work on an importer. I took the Codoforum driver as a blue print (as well as your documentation) and finally got it to work — well, almost.

The migration process didn't show any errors:

Importing categories and users...
Categories imported in : 0.07706093788147
users imported in : 0.38718104362488

Importing topics...
topics imported in : 0.76451396942139

Importing posts...
posts imported in : 39.410881996155

Checking counts of users...
user post counts updated in : 3.2901763916016E-5 s

Checking counts of topics...
topic counts updated in : 3.3855438232422E-5 s
category counts updated in : 4.5061111450195E-5 s

Importing permissions, bans, blocks, block_roles, edits, fields, fields_roles, fields_values

Import successfull in total time 40.639749765396 s

Looking at the database, I see that all users, categories, topics and posts are there, and the values seem okay. However, when I visit the forum, it appears to be empty — there are no posts and no categories.

5c1a3c9859085

Looking into the admin area, it seems that nobody has permissions to view anything; and for whatever reason, I cannot change any permissions. See:

5c1a3a9ba37e4

A look at the database revealed that the codo_permissions table doesn't look right. Here's what's inside:

SELECT * FROM `codo_permissions`

pid rid cid tid permission  granted inherited   

1   0   0   0       0   0   
2   0   0   0       0   0   
3   0   0   0       0   0   
4   0   0   0       0   0   
5   0   0   0       0   0   
6   0   0   0       0   0   
7   0   0   0       0   0   
8   0   0   0       0   0   
9   0   0   0       0   0   
10  0   0   0       0   0   
11  0   0   0       0   0   
12  0   0   0       0   0   
13  0   0   0       0   0   
14  0   0   0       0   0   
15  0   0   0       0   0   
16  0   0   0       0   0   
17  0   0   0       0   0   
18  0   0   0       0   0

Before I run the migration script (with a vanilla Codoforum installation), there's much more content there.

All in all, it seems as if the permissions are somehow not set up correctly.

Does anyone have an idea what could be going on here?
I'd really appreciate any help! Thanks a lot in advance!

Cheers,
Daniel

P.S.: I'd also be happy to pay for official support, of course!

Hey there, I've got an old BBPress 1.x forum that's still running on PHP 5.6 and thus needs to be replaced rather sooner than later. ;) Codoforum seems like a perfect (read: much better) replacement, so I started work on an importer. I took the Codoforum driver as a blue print (as well as your [documentation](https://codoforum.com/documentation/how-to-write-a-forum-importer)) and finally got it to work — well, *almost*. The migration process didn't show any errors: ```` Importing categories and users... Categories imported in : 0.07706093788147 users imported in : 0.38718104362488 Importing topics... topics imported in : 0.76451396942139 Importing posts... posts imported in : 39.410881996155 Checking counts of users... user post counts updated in : 3.2901763916016E-5 s Checking counts of topics... topic counts updated in : 3.3855438232422E-5 s category counts updated in : 4.5061111450195E-5 s Importing permissions, bans, blocks, block_roles, edits, fields, fields_roles, fields_values Import successfull in total time 40.639749765396 s ```` Looking at the database, I see that all users, categories, topics and posts are there, and the values seem okay. However, when I visit the forum, it appears to be empty — there are no posts and no categories. ![5c1a3c9859085](serve/attachment&path=5c1a3c9859085) Looking into the admin area, it seems that nobody has permissions to view anything; and for whatever reason, I cannot change any permissions. See: ![5c1a3a9ba37e4](serve/attachment&path=5c1a3a9ba37e4) A look at the database revealed that the `codo_permissions` table doesn't look right. Here's what's inside: ``` SELECT * FROM `codo_permissions` pid rid cid tid permission granted inherited 1 0 0 0 0 0 2 0 0 0 0 0 3 0 0 0 0 0 4 0 0 0 0 0 5 0 0 0 0 0 6 0 0 0 0 0 7 0 0 0 0 0 8 0 0 0 0 0 9 0 0 0 0 0 10 0 0 0 0 0 11 0 0 0 0 0 12 0 0 0 0 0 13 0 0 0 0 0 14 0 0 0 0 0 15 0 0 0 0 0 16 0 0 0 0 0 17 0 0 0 0 0 18 0 0 0 0 0 ``` Before I run the migration script (with a vanilla Codoforum installation), there's much more content there. All in all, it seems as if the permissions are somehow not set up correctly. Does anyone have an idea what could be going on here? I'd really appreciate any help! Thanks a lot in advance! Cheers, Daniel P.S.: I'd also be happy to pay for official support, of course!

Hi,

After some testing, we found the bug that is causing your issue.

Please make the following change:
open codoforum/sys/CODOF/Importer/Import.php

Around line 52, replace

$qry[] = 'TRUNCATE TABLE codo_permissions';

with

$qry[] = 'DELETE FROM codo_permissions WHERE cid <> 0';

Unfortunately, you will have to do a fresh installation, make above code change and then run the migration because that permissions table has already been corrupted.

Hi, After some testing, we found the bug that is causing your issue. Please make the following change: open codoforum/sys/CODOF/Importer/Import.php Around line 52, replace ```` $qry[] = &#039;TRUNCATE TABLE codo_permissions&#039;; ```` with ```` $qry[] = &#039;DELETE FROM codo_permissions WHERE cid &lt;&gt; 0&#039;; ```` Unfortunately, you will have to do a fresh installation, make above code change and then run the migration because that permissions table has already been corrupted.
Necessity is the mother of all inventions!

Indeed, that fixes the problem! Thanks so much for looking into it! smile

Indeed, that fixes the problem! Thanks so much for looking into it! :)
51
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft