Apparently formalizing an (EP) alliance between Poland's ruling party PiS and Hungary's ruling part Fidesz, despite numerous ideological similarities, might be held back by differences over Russia and Ukraine. I'm not sure I understand why those differences exist though. Both Poland and Hungary are former Soviet-block states and both share a border with Ukraine for instance.
It's true that Poland has a direct border with Russia, but only with the Kaliningrad exclave. This alone doesn't seem sufficiently explanatory, unless Russia somehow threatens more annexations, but officially at least there are only like 13,000 Russians in Poland, so I'm guessing that's not a serious concern.
Apparently PiS supports Ukraine's EU membership/application but Fidesz seemingly does not. There are somewhat sizeable Hungarian and Polish minorities in Ukraine (almost equal in number apparently), but for a reason that escapes me Ukraine is only treating badly the Hungarian minority (if Fidesz is to be believed), so I'm not sure how much of this is a matter of realities vs perceptions.
So why is there a big divergence over Russia (and Ukraine) between PiS and Fidesz?