@foresightyj opened this Issue on September 20th 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 commented on September 20th 2018 Member

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 commented on September 25th 2018

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.

Powered by GitHub Issue Mirror