Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some JQuery functionalities not working #11

Closed
fedemotta opened this issue Sep 24, 2015 · 4 comments
Closed

Some JQuery functionalities not working #11

fedemotta opened this issue Sep 24, 2015 · 4 comments

Comments

@fedemotta
Copy link

Hi,
There is a JQuery error:

backend.local/:368 Uncaught ReferenceError: jQuery is not defined

I think this is happening because the hardcoded js code in the view.

Thanks

@c006
Copy link
Owner

c006 commented Sep 24, 2015

This will get it working.

File Path:
/vendor/yiisoft/yii2/web/JqueryAsset.php

class JqueryAsset extends AssetBundle
{
    public $sourcePath = '@bower/jquery/dist';
    public $js = [
        'jquery.js',
    ];
    public $jsOptions = [
        'position' => View::POS_HEAD,
    ];
}

@fedemotta
Copy link
Author

Hi Jon,
I submitted a pull request with a refactor which fixes this issue. I tested those changes and it seemed to be working.

Cheers

@c006
Copy link
Owner

c006 commented Sep 27, 2015

Thank you, that is a good idea to have jQuery load automatically.

Jon

On Thu, Sep 24, 2015 at 6:22 PM, Federico Nicolás Motta <
notifications@github.com> wrote:

Hi Jon,
I submitted a pull request with a refactor which fixes this issue. I
tested those changes and it seemed to be working.

Cheers


Reply to this email directly or view it on GitHub
#11 (comment)
.

@c006 c006 closed this as completed Dec 10, 2015
@lostsnow
Copy link

lostsnow commented Mar 3, 2016

Why change the yii framework code to fix this issue? This will causes not compatible in future.

lostsnow added a commit to lostsnow/yii2-migration-utility that referenced this issue Mar 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants