Cool let us know if you run into other issues.
I just lost a category full of threads when making a new category
-
If a category has itself as the parent that would cause an infinite loop in the category retrieval. We should disallow that. Can you post a link to your forum?
-
If you are on latest update to https://github.com/NodeBB/NodeBB/commit/5b08538264846717b350df8c5ce1d44a0cd56c50
-
Confirmed the problem is fixed by this in latest master. I can now access the category which previously caused infinite loop. By the way, in the Redis database the broken category didn't have itself as parent so I don't know why this would happen ... but it works now so I'm happy. Thanks.
-
@Pilvinen there is another sorted set that has the categories children. Check that as well.
zrange cid:<parent_cid>:children 0 -1
replace
<parent_cid>
with the category id of the parent. -
@baris
You were right. The zrange of that category still has itself set as the parant. I'm a bit hazy on the details how the zranges work ... how do I change that value? -
Post the output of the zrange that you run.
-
zrange cid:7:children 0 -1
1 ) "7" -
You can remove it by
zrem cid:7:children 7
-
@baris
Thanks. It's now been removed - though the forums already worked fine even without this after the infinite loop was prevented. But better safe than sorry. -
Yeah it does work because of the check I added in core. I also added a check so you can't set the parent to itself to prevent it happening again.