My E320 drove me crazy with a warm start problem

.Yes I replaced the OVP,both fuel pumps,new fuel filter,fuel regulator,fuel relay,fuel regulator and finally the CPS.All to no avail.What happens is, COLD start Fine,soon as it gets warm
and you turn it off,it won't start for about 30 min till it cools off.It turns over it just wouldn't start.So it did its thing and I popped the hood and looked the CPS wire and noticed it laying on the thermstat housing.So I took the excess wire and turned the clip to the CPS and excess wire toward the fan and put a plastic tie to keep it away from heat,the thing started right up and have not had any start problems since.Hopes this helps somebody else.Well that did not cure it either,I wound replacing the Crankshaft
sensor and that was the problem.The CRS does not throw a code.