I was doing a German review and I got a weird message:
I guess the problem is the word order but the message is disturbing...
I am not sure what your problem is. What you wrote translates back to English as "I like to not sleep". (Intentional split infinitive here because it's perfectly fine English grammar and because workarounds would introduce ambiguity.)
The second proposed correct solution is the normal translation. The first one has a capitalisation error. It should be "Ich mag Schlafen nicht" ("I don't like sleeping"). I have noticed many similar capitalisation errors in the German course for English speakers, and only there. I always report them when I see them.
the problem is that the message says "you used the ich form instead of the wir form"
EDIT regarding the capitalization: In the current case I think it is not entirely clear whether schlafen is a verb or noun, and in this case it can be written non-capitalized as well, I think.
Oh, sorry I missed that. Yes, that's totally weird. Duolingo should know that the second proposed correction is better than the first, it should know that the second is closer to what you wrote, and it should know (via grammar markup) that in the first correct translation "Schlafen" is a noun, not a verb.
I didn't consider that, but I think it still has to be capitalised. You can build a similar sentence in which "schlafen" is still a verb, but the sentence is "Ich mag nicht schlafen".
Without the negation it would in fact be ambiguous:
"Ich mag schlafen."
"Ich mag Schlafen."
These are both correct because due to the absence of "nicht" we don't know which word form to expect.
"Ich mag schlafen nicht" is incorrectly capitalised, though the post you linked says otherwise if you take it literally. It didn't consider a case like this, as you can see from the absence of immediately relevant example. The point here is that "Ich mag X nicht" can only be used if X is a noun or equivalent word form. Verbs can only appear as X after they have been turned into nouns.
The system compared your solution to the questionable first "correct" solution (which is also wrong, as johaquila has pointed out, because the noun "Schlafen" is not capitalized), and this is how the hint has been created.
Edit: according to the link FrankySka has posted, capitalization might not be required here, however, "schlafen" is not the 1st person plural form here, what the system seems to assume.