Gaps where models are missing from a rank do not prevent models from fighting.
If a unit is fighting to its flank, the models in the incomplete rank are moved into contact with the enemy, there to fight and be fought normally. If the unit is fighting to its rear (or fighting to both flanks) some enemy models might not end up in base contact because of the models in the incomplete rear rank. In this specific situation, the models can fight across the gap, even if not physically in base-to-base contact. Treat these models as being in base contact with the enemy.