From what I can tell they got married in The Black Pearl. The fact that Barbossa's first mutiny should have prevented him to be the "real" captain of the pearl. But putting this aside, I'm fairly sure that when Jack's right in the next ship fighting Jones, Barbossa couldn't be the offical captain of the pearl. So he shouldn't have the power to perform any marriage ceremony. What I concluded from this is that their marriage may be in fact unofficial according to the maritime law. Therefore it makes that whole scene pointless. And even if they knew this, it would still disturb me that they consider Barbossa to be the real captain of the pearl just because it serves them better at that moment. Either way this is one unnecessary plothole. Do I miss anything?