The correct way to add a student to a class is to create a sale but the corresponding product of this course does not exist.
Add the student manually without a sale.