I'm confused by your statement
If trailer is plugged into truck, everything works fine including tail lights.
Truck doesn't provide any power to trailer (lights, bathroom fan, etc). It only provides a 'charge' to the trailer battery which then supplies the DC power to dist. panel.
If you installed new battery and connected the cables backwards you would have blown the 'reverse polarity' fuses on the converter and get no power from battery.
If the DC circuit breaker on positive cable from battery to converter was tripped/not reset you'd get no power from battery
If new battery voltage was low...truck charge line might have supplied enough DC voltage for items to work.....but usually that charge line size prevents much of a dc load. Typically takes hours of drive time to recharge a semi-low battery.
:H