@PitaJ thanks! That was the issue
unable to edit groups/bad data
Brass Man last edited by
A while back I restored my database from a backup, and I have a feeling that backup may have been corrupt.
when I try to visit the admin/manage/groups page, my nodebb instance crashes and reboots. I get the error
Cannot read property 'indexOf' of undefined. After doing a little debugging I found that that the query for
groups:createtime(line 152 in src/database/mongo/sorted.ja), is returning some objects that DONT have "groups:createtime" as their key ... these documents don't have the expected schema, which is what's throwing that undefined error.
I've found, using the mongo console, when I use
find('_key': 'groups:createtime')I only get the objects I expect, but
find('_key': \groups:createtime\)returns the bad objects (note that the substring "groups:createtime" appears nowhere in _key string for those objects). More upsettingly, if I remove those bad objects by their ObjectId, they STILL return in that query ... despite the remove command returning without error, despite no longer being able to look the object up by it's ID.
I'm not clear on whether this is a NodeBB issue at all, or entirely on the Mongo side, but in the meantime, I can't edit anything in regards to groups (including adding/removing members to existing groups), and attempts at upgrading my forum version fail at the database migration step.