To the OP:
@wam68 . I wont be surprised if you are confused after having been presented with two sets of conflicting advice. I hope by clarifying my stance you'll be able to make a better decision regarding your possibly bent derailer hanger.
Modern derailer hangers are designed as sacrificial parts to protect both the frame and derailer from damage when a bike falls over or crashes. The hanger is designed to bend. Older steel frames had an integral hanger that was part of the cast-iron lug that connected the seat-stay, chain-stay and drop-out. It did bend readily because it was designed rather slender, but obviously once it is broken, repair is expensive. Nowadays we simply buy a new hanger and bolt it on. It is practically a consumable and hard-core MTB stage racers carry a spare one around their neck on a leather thong where it serves as a bit of jewellery that can come in handy in the event of a crash. In the field it is much easier to replace the hanger using a single allen key rather than to attempt to bend it straight. In the workshop you have options and time. There are even special tools for straightening derailer hangers such as this one from
Park (rather clunky) or this beauty from
Shimano. I am biased on this one.
Both these tools are designed to perform slight corrections of a bent derailer hanger whilst on the bike. This goes for permanent or sacrificial hangers.
There is a problem with these tools though and that stems from the nature of certain metals to work harden. You can read about it
here.
This is quite a big problem for bicycle mechanics, especially if they don't know what to look for.
Here's a picture of a typical hanger. At the top are the two mounting holes for bolts to attach the hanger to the frame. The frame has a correspondingly mated surface to match the odd-shaped recess in the hanger. The bolts only hold the hanger at the top and if it is perfectly flat, it pulls the hanger against the frame and you have a reasonable joint. I say reasonable because it is just good enough to not flex when shifting but as you can see, if you apply a force the bottom part, it will flex and then bend. It is designed to be like that so that it won't damage the frame. However, when straightening it, the bend, typically in a straight line just above the bottom thick part of the hanger, doesn't go back to its original shape because that zone is now harder than the zones adjacent to it which are still soft. The new bend will now be in one of these zones and this means that although technically straight (the derailer is in line with the sprocket plane again), it is now unstable because it is no longer lying flat against the frame. If you look at it from the back you can often see it's new S-shape and a gap between the hanger and the frame. The derailer will now flex easily because of this poor link. Shifting is compromised.
No matter how fancy the tool (and the Shimano one is fancy), it cannot do the job properly and a straightened hanger is a problem hanger. The solution is to remove it, lay it on an anvil and hammer it flat. One or two well-aimed blows does the job and you can confirm the effect by aiming it against a straight edge. Then you refit it and use the tool to confirm that it is indeed in line. The tool will make small corrections too because you now work from a good base. If you don't have the tool, you'll have to confirm that it is good by getting good adjustment from the derailer.
Work hardening is poorly understood by most bike mechanics because it is not part of any curriculum I've seen. A beautiful example of work hardening at work can be seen on damaged aluminium freehub bodies. These get gauged by steel sprockets cutting into them from pedaling forces. However, the sprocket doesn't cut deeper and deeper but arrests the process by itself. This is because the aluminium becomes progressively harder as the cut progresses.
View attachment 83787
Side view of freehub body damage.
Aluminium hangers, including the one in the photo above, are anodized. This is the shiny, protective layer on top of the raw aluminium and is usually black or silver. However, it can be any colour. Anodising is a hard layer of ceramic that lies on the surface - one half submerged in the aluminium, one half on top. It is completely unlike a coating of paint or electroplating in that way. This provides us with a convenient indicator whether the piece is bent or not. If you look at the suspected bended area you'll notice fine hairline cracks. Because anodizing is so hard, it doesn't bend with the aluminium but cracks in this way. These little cracks are called crazing and are great for showing you exactly where the bent zone (and now hard zone) is l located.
One more thing. In an accident a hanger usually bends inwards because that's the way the bike falls. If you now put your wobbly hanger on a flat surface and keep track of its orientation on the bike, it should be evident that the bend is in the right direction, giving you just a bit more confidence that it is indeed bent. If the bend is in the opposite direction, be suspicious unless of course you know the cause and it all adds up.
@wam68 I hope this gives you a better understanding of hanger repair.