1.15.2 spwner blocks broken?

Trying to make an exp farm for my server but any time I put down a spawner it will spawn once then never again. It will even show the zombie or whatever in the spawner then once it spawns it turns to a pig in the middle then stops working. Any suggestions or workarounds on how to get it working?