The influence of random pinning on the vortex dynamics in a periodic square potential under an external drive is investigated. Using theoretical approach and numerical experiments, we found several dynamical phases of vortex motion that are different from the ones for a regular pinning potential. Vortex transfer is controlled by kinks and antikinks, which either preexist in the system or appear spontaneously in pairs and then propagate in groups. When kinks and antikinks collide, they annihilate.