The ofmucroom table contains the last ID (max(roomid)) with value 33971, but the last inserted record (order by creationdate) is with value 7745, and the next one will be 7746 and so on.
This is breaking some rooms, for some reason it missed the correct sequence.
Truth! Something was done wrong on that server that broke.
I made the comparison with another database and there are no such duplications. I will delete all these duplicate records and update the idtype=23 to SELECT max(roomid) + 1 FROM ofmucroom.
Do you know where there is in the documentation about the references of all these records of the ofid table for me to check the other sequential values?