There are so many external factors that can affect your PhD progress, but perhaps the single most important factor is how you react to them, internally.
If you panic, or disengage, or get angry, or complain, or interpret events in a way that makes them impossible to deal with, then it doesn't matter what tactics you use; nothing will work. But if you can face whatever happens with calm determination and creativity, you can deal with almost anything.
The Neuroscientist-turned-Buddhist-monk, Matthieu Ricard, describes the ideal state of mind as being like the deep ocean; even if there is a storm on the surface, the depths beneath remain undisturbed.
Legendary basketball coach John Wooden had a different take on the same idea; he demanded that, following a match, those watching shouldn't be able to tell whether they had won or lost from his players' demeanour.
In other words, whatever's happening externally shouldn't affect your basic attitude. This takes practice.