I’m struggling since having tried to implement RowVersion column in Azure which Yii can’t support. So I rolled back my db changes but keep getting the error:
You’re trying to register a file after View::endPage() has been called
This warning pops up when you are trying to register JS or CSS file after the page has been generated (see here). You need to check which of your files is trying to register something at this point (when it should not). It was introduced in 2.0.44.
Thank you for the link. Any chance you could enlighten me as to what I’m looking for exactly.
I put back in place an old version of the View file and now the error is gone. I’ve compared the 2 files (good vs bad) and truly don’t see any changes in registering files.
both files have a single
$this->registerJS($script);
which is the last line of the view. That’s it. Is there something else I should be looking for? Why does the error flag the Controller when it’s the view that’s at fault?
Would having changed a section of code from
echo $this->render(
to
echo $this->renderAjax(
be the cause? It 's the only other thing standing out.