Planting crops (wheat, carrots, potatoes, beetroots) directly next to each other in the Nether and End causes them to "uproot" themselves, dropping whatever they would have dropped at that stage of growth (full grown wheat plant drops wheat and seeds, etc.). This only happens in the Nether and End, and doesn't seem to affect pumpkin and melon stems.
Did you provide enough light and water (may be a bit problematic in the nether) ?