I would start by checking these things:
1.) Ensure the encoder wire pinout is correct, and no short exists. See drawing below.
2.) Use a multimeter to ensure none of the wires are broken internally.
3.) Ensure the pins are seated correctly in the connector at the end of the wires.
4.) Check the pins inside the yaw connector on the board to ensure none are bent over.
5.) Ensure the connector solder is not cracked away from the board.
On second read, I noticed you said "replaced" the yaw encoder. That does not always work.
1.) Ensure you mounted the new one correctly (not flipped over)
2.) It may be a better idea to repair the wires on the original, and use it instead of the replacement.