I’ve already read a lot of documentation and google-results, also have a Yii.CookBook…
I’ve solved a lot of ‘problems’ caused by myself, but…
Today i met a problem, wich i couldn’t resolve by myself - i’ve got an “yiiactiveform() is not a function” error in my app…
I’ve searched the forum, then google, and have tried a lot of solutions – from ‘jquery.js duplicate’, to ‘CActiveForm properties’ like enableClientValidation…
The situation is that ‘jquery.yiiactiveform.js’ is not inlcuded – there’s no correct ‘<script>’ tag at the page, only for ‘jquery.js’.
First of all, i thought i did something wrong with my clientScript and assetManager, even commented all my code…
But then i tried a different way – i’ve created a new application with yiic… and you know – i got same problem on the Contact page of the example application… and there’s also no ‘yiiactiveform’ script!
Please, help me. I don’t know what to do now, and what could be the reason of such system behavior… maybe some system requirements?
P.S. I’ve shot my source code form browser, on the Contact page, and marked my <script> resource.4091
I apologize for the posting guidelines non-compliance, will be more careful in the future.
So, the problem manifests on the just created application (containing example site with Contact and Login forms). So, the view file is absolutely standart, there is no any foreign line of source code!
I tried the same procedure on the other server, and everything was ok, ‘yiiactiveform.jquery.js’ was included correctly. I decided this depends on the system requirements, so if i can post any additional information (like phpinfo()) to make a hint with my problem?
p.s. the version of framework is latest, v1.1.13
p.p.s. In the described situation, ‘jquery.yiiactiveform.js’ is correctly published in the assets folder
There is nothing to apologise it’s not about non-compliance it’s just about you getting better help
OK, first of let me explain one thing, the classic contact page generated by default does not have ajax or client validation enabled and that’s why no activeform.js should be included but at the same time you should not get any "yiiactiveform() is not a function"[size=2] message.[/size]
[size=2]
[/size]
So now please explain a bit more in details your problem.
Do you get that error message on the contact page? If yes then please try to find where and why yiiactiveform() is called.
Do you get that error only on your page? If yes please post the source of that view page.
And this is a standart page, it’s generated by ‘yiic webapp /path/to/app’ command in each case i’ve tried on the several servers (local and remote). I thought this is a standart in version 1.1.13 …
Ooops… yes, my bad… this has been changed long ago but I don’t use that view so I was still thinking of it as it was once
I just tried this and created a new webapp, the contact code is as you posted above and yiiactveform.js is included. I don’t see why it would not be included for you on a clean new created webapp.
Sorry for the delay in replying,i had 3-posts-per-first-day limit
As I expected, the problem was magical, and i’ve solved it in unbelievable simple way – i’ve just re-downloaded Yii archive and just replaced my YiiRoot folder.
I can not imagine the possible causes of such behavior, but the result is ok