'typeerror' After Ajax Post

I have a very odd problem that I’ve been trying to track down. It seems that after any successful ajax POST, the next page load will fail with an error, “TypeError: jQuery(…)collapse is not a function” or whichever bootstrap element is loaded first. I then must wait about 10 seconds and do a refresh to get everything working once more.

I think the error is related to Yii Booster not loading correctly. I’ve verified the problem in multiple browsers. I’ve also just tried simple ajax requests on multiple pages with the same effect - the bootstrap elements no longer load anymore unless a 10 second delay is noted before page reload.

Now it is truly confusing me.

Any ajax link,

echo CHtml::ajaxLink('test me', Yii::app()->createUrl('post/test'));

that is clicked, will break the next page load if performed within roughly 10 seconds of clicking the ajax link!! It always breaks on:


TypeError: jQuery(...).collapse is not a function

I’ve moved the ajax link to multiple locations on my site and I just cannot figure out how to solve this.

I think I’ve narrowed it down to that bootstrap is not being loaded properly. I don’t know why, but any ajax link that is followed to my domain, even if 404’d, will cause the JS and CSS to not load to the browser. I must wait 10 seconds until I refresh again for everything to load again nicely. There are no errors in firebug. I’ve checked that my assets folder is not being written to every reload because I thought that it was causing the wait time. Hmmm, I don’t know what to do now.

EDIT: I "solved" the problem by ditching YiiBooster. I switched over to Yiistrap 1.2.0 and the problem has resolved.