Could it be that Cocoa has a special Plantingcondition, to be exactly three Blocks of Dirt under it. If you have any noncrossbreeded Cocoa, that has not three blocks of Dirt under it, then say it.
I just checked. At elevation 66 with one dirt and air in the two blocks below it, I barely was able to plant cocoa, but not until I maxed out the fertilizer on the crop block. I dropped the air quality slightly and couldn't plant it anymore. As soon as I put another dirt block under the cocoa, it let me plant it. So yes, it is possible, but not easy.