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

With a fresh installation of matomo, plus TagManager, many javascript errors show up in console #13457

Closed
foresightyj opened this issue Sep 20, 2018 · 3 comments
Labels
worksforme The issue cannot be reproduced and things work as intended.

Comments

@foresightyj
Copy link

foresightyj commented Sep 20, 2018

This issue is a bit similar to issue #13226 though a bit different in actual errors.

image

VM1587:37 TypeError: Cannot read property 'formatDate' of undefined
    at formatDate (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:2638)
    at PeriodSelectorController.getCurrentlyViewingText (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:2623)
    at fn0 (eval at compile (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:363), <anonymous>:4:505)
    at index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:252
    at m.$digest (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:269)
    at m.$apply (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:272)
    at index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:285
    at e (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:170)
    at index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:173
Uncaught TypeError: $(...).liveWidget is not a function
    at isStarted (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:4137)
    at onTabBlur (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:4138)
    at HTMLDocument.<anonymous> (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:4140)
    at Object._change (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:930)
    at HTMLDocument.listener (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:932)
VM1587:37 TypeError: dashboardElement.dashboard is not a function
    at fetchDashboard (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:3432)
    at Object.link (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:3434)
    at index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:139
    at index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:207
    at ua (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:207)
    at q (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:193)
    at f (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:184)
    at index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:183
    at index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:2239
    at index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:258 "<div id="dashboard" piwik-dashboard="" dashboardid="1" class="ng-scope ng-isolate-scope">"

image

In Manage Plugin page:

index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:4137 Uncaught TypeError: $(...).liveWidget is not a function
    at isStarted (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:4137)
    at onTabBlur (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:4138)
    at HTMLDocument.<anonymous> (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:4140)
    at Object._change (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:930)
    at HTMLDocument.listener (index.php?module=Proxy&action=getCoreJs&cb=2e0722f4b8ee37a237e7977e703fcc5d:932)

image

@tsteur
Copy link
Member

tsteur commented Sep 20, 2018

formatDate and liveWidget are methods that are used in core and likely it isn't Tag Manager related. Can you maybe try downloading Matomo again and replace all existing files just in case a file wasn't copied correctly? (make sure to backup config/config.php see https://matomo.org/docs/update/#the-manual-three-step-update )

Did you maybe otherwise deactivate any core plugins?

@foresightyj
Copy link
Author

I did not deactivate any core plugins. I just installed a new plugin which is the Tag Manager (which is irrelevant to the issue).

I tried again and still had the same problem after replacing all the files completely.

image

I figured the zip file was last updated on 1 Sep 2018. My original issue was reporting exactly this zip file.

image

formatDate is a method defined in jquery.ui.datepicker.js which is also in the file system.

➜  /piwik ag formatDate  -l
tmp/assets/asset_manager_core_js.js
ERR: Skipping ./tmp/sessions/sess_2ac78m05v68i46h1vvhvrspb6b: Error opening file: Permission denied
ERR: Skipping ./tmp/sessions/sess_8ubvirmj5g1nupr61k3gvitbtc: Error opening file: Permission denied
vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php
libs/bower_components/jquery-ui/ui/jquery-ui.js
libs/bower_components/jquery-ui/ui/minified/jquery-ui.min.js
libs/bower_components/jquery-ui/ui/minified/jquery.ui.datepicker.min.js
libs/bower_components/jquery-ui/ui/minified/jquery-ui.custom.min.js
libs/bower_components/jquery-ui/ui/jquery.ui.datepicker.js
libs/bower_components/jquery-ui/ui/jquery-ui.custom.js
plugins/CoreHome/angularjs/common/services/piwik.js
plugins/CoreHome/angularjs/common/services/periods.js
plugins/CoreHome/angularjs/sparkline/sparkline.component.js
plugins/CoreHome/angularjs/period-selector/period-selector.controller.js
plugins/CoreHome/angularjs/date-range-picker/date-range-picker.component.js
plugins/CoreVisualizations/angularjs/single-metric-view/single-metric-view.component.js

but in the javascript console, $.datepicker is undefined:

image

I suspect this is a javascript bundling issue and $.datepicker failed to be included.

@Findus23
Copy link
Member

I still have no idea why the JS generation was not working for you. As no one else reported the same issue since, I'd say that it was a single case.

If you or someone else can reproduce this issue on the latest Matomo version, please reopen the issue or create a new one.

@Findus23 Findus23 added the worksforme The issue cannot be reproduced and things work as intended. label May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants