The bug
Cake does not appear on maps. This includes uneaten cake, partially consumed cake, and cake with a candle of any color.
How to reproduce
Place down cake(s)
Obtain an empty map and fill it above the cake(s)
Observe how no cakes are shown on the map
I think that all non-full blocks don't appear at maps, this is because it's very confusing whenever we need a fence gate shown or the block underneath (grass) because you can see them both at the exact X and Z coordinate.