My wood splitter would do the same thing. It would foam up and hydraulic oil would be squirting out of the vent hole in the hydraulic tank cap. I finally figured it out. There was a "hinky" filter arrangement in the hydraulic oil return line - it was an aluminum screw type outer cartridge with a sintered bronze filter inside.
Anyhow, there was a rubber 0-ring that sealed the unit when screwed shut that would fail because of vibration and allow air into the system. Once I realized this, I replaced the 0-ring annually and problem solved.
It is very possible that the foaming oil is the cause of the splitter not shifting. Under heavy load mine would shift down - as though into a lower gear. The foaming oil situation on mine would usually keep this from happening.