It’d be hard to guess what could be causing this, but I’m aware that having ajax="true" could cause this code not to work.