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

Javascript console error, and non functioning widget #22

Open
stovesy opened this issue Oct 4, 2023 · 4 comments
Open

Javascript console error, and non functioning widget #22

stovesy opened this issue Oct 4, 2023 · 4 comments

Comments

@stovesy
Copy link

stovesy commented Oct 4, 2023

After a recent composer update, I'm getting the following error at the console...

Uncaught SyntaxError: expected expression, got '<'[jquery.inputmask.bundle.js:1:3]
Uncaught TypeError: $elDisp.inputmask is not a function

Everything working fine before the update..

Quite a few packages updated..

  • Upgrading yiisoft/yii2-composer (dev-master 30d9c84 => dev-master 2cd6eee): Extracting archive
    • Upgrading bower-asset/punycode (v1.3.2 => v2.2.3): Extracting archive
    • Upgrading bower-asset/inputmask (3.3.11 => 5.0.9-beta.32): Extracting archive
    • Upgrading yiisoft/yii2 (dev-master ceb3e20 => dev-master f4f97f0): Extracting archive
    • Upgrading tinymce/tinymce (6.7.0 => dev-master 02e194e): Extracting archive
    • Upgrading phpunit/php-code-coverage (9.2.x-dev 55a161b => 9.2.x-dev a296fae): Extracting archive
    • Upgrading phpunit/phpunit (9.6.x-dev bf8634b => 9.6.x-dev b1b544b): Extracting archive
    • Upgrading psr/event-dispatcher (dev-master e275e2d => dev-master 977ffcf): Extracting archive
    • Upgrading psr/http-factory (dev-master 6d70f40 => dev-master 7037f4b): Extracting archive
    • Upgrading guzzlehttp/psr7 (2.6.x-dev 2ce93c4 => 2.6.x-dev 38ef514): Extracting archive
    • Upgrading psr/http-client (dev-master 0955afe => dev-master bb5906e): Extracting archive
    • Upgrading guzzlehttp/guzzle (7.8.x-dev 56a99b5 => 7.9.x-dev d95d9ab): Extracting archive
    • Upgrading psr/container (dev-master 90db7b9 => dev-master 7079847): Extracting archive
    • Upgrading illuminate/collections (10.x-dev f494398 => 10.x-dev 133f599): Extracting archive
    • Upgrading kartik-v/bootstrap-fileinput (dev-master 8f4a40f => dev-master 0731fae): Extracting archive
    • Upgrading components/flag-icon-css (dev-main 59ac20a => dev-main 6784329): Extracting archive
    • Upgrading setasign/fpdi (v2.4.1 => v2.5.0): Extracting archive
    • Upgrading mpdf/psr-http-message-shim (2.0.0 => v2.0.1): Extracting archive
    • Upgrading symfony/mime (6.4.x-dev 4f1791b => 6.4.x-dev fae6d88): Extracting archive
    • Upgrading fakerphp/faker (v1.23.0 => 1.23.x-dev 8d32135): Extracting archive
    • Upgrading symfony/process (6.4.x-dev 2adbb78 => 6.4.x-dev 7a98cdf): Extracting archive
    • Upgrading yiisoft/yii2-queue (dev-master 726a4fd => dev-master 17fcf6a): Extracting archive
    • Upgrading symfony/mailer (6.4.x-dev 70b7234 => 6.4.x-dev c445b16): Extracting archive
    • Upgrading twig/twig (3.x-dev fd8f61b => 3.x-dev 3ae6fb8): Extracting archive

Any suggestions as to what I might try to find the issue ?
Thanks.

@stovesy
Copy link
Author

stovesy commented Oct 4, 2023

Actually the same problem occurs with the stock Yii2 MaskedInput widget. Maybe somethign has changed due to Upgrading bower-asset/inputmask (3.3.11 => 5.0.9-beta.32.
Quite a jump.

@stovesy
Copy link
Author

stovesy commented Oct 4, 2023

Uncaught SyntaxError: expected expression, got '<'jquery.inputmask.bundle.js:1:3

This error is received because the file jquery.inputmask.bundle.j does not exist in the asset cache

@stovesy
Copy link
Author

stovesy commented Oct 4, 2023

class MaskedInputAsset extends AssetBundle
{
public $sourcePath = '@bower/inputmask/dist';
public $js = [
'jquery.inputmask.js',
];
public $depends = [
'yii\web\YiiAsset',
];
}

Fixes it for me, but I've no experience with this sort of thing.

@mtangoo
Copy link

mtangoo commented Oct 25, 2023

Opened an issue: yiisoft/yii2#20041

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

2 participants