I have a document that requires table of contents entries made up of the concatenation of several headers on the first page of each chapter. I created a non-printing text frame on those pages and assigned a style to the text inside that I use to build my table of contents. I then created running header text variables to pick up the headers on the page and insert them into my text frame. It all looks great on the page but when I generate my table of contents it's a jumbled mess of bits of the text. (InDesign 5.5)
Can you post some screen captures please? Visit the forum web page (not community help) and in the reply editor click the camera icon to embed an image in your post, like this:
My suspicion is that there is insufficient width in your TOC to hold all of the text and it is being compressed onto itself, which is what happens to variables when there is not enough space. Variables are a single character for formatting, and they cannot break across lines.