Is the villager that's trapped by the minecarts taking on the farmer's work station? My villager crop farm had that issue. If that is what's happening, give the trapped villager a different profession and lock it immediately. If the farmer villager cant use his workstation he wont harvest, plant or throw crops. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.