That and a miscommunication on the part of Union General Rosecrain which pulled a Brigade out of the Union defences at the very point of attack at the wrong time. The Confederates would have probably broken that defencive line anyway but luck (Good for the Confederates and Bad for the Yankee's) played a major part in the ease of that attack.
The fact that Longstreet became involved in the squabbling among the AoT. command structure trying to replace Bragg to me is not the mark a good leader. I believe that Longstreets involvement in that episode was self engrandizing. That he was looking to add his strenght of reputation to oust Bragg and to be named as commander of the Army of Tennessee. Not good soldiering in my book.