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

Dashboard may generate JS error: TypeError: $widget.dashboardWidget is not a function #14944

Closed
AramVK opened this issue Oct 3, 2019 · 3 comments · Fixed by #14951
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@AramVK
Copy link

AramVK commented Oct 3, 2019

I wanted to re-arange a newly added widget to my dashboard and I noticed the position doesn't get saved. I fired up the console and when dropping the widget after dragging, I see the following error coming up:

TypeError: $widget.dashboardWidget is not a function index.php:3136:9

Line 3136:

$widget.dashboardWidget('reload',false,true);}

I figured this would be the cause. Running version 3.11.0.

@tsteur
Copy link
Member

tsteur commented Oct 3, 2019

I can't reproduce this here. Any chance you can reproduce this on our demo? https://demo.matomo.org/index.php

Do you know if you're using any third party plugins?

@AramVK
Copy link
Author

AramVK commented Oct 3, 2019

I can reproduce it on that demo as well, by adding a widget. I added User Comments (a Goal). Then I dragged that widget to another position.

TypeError: $widget.dashboardWidget is not a function index.php:3247:9

@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should. labels Oct 3, 2019
@tsteur tsteur added this to the 3.12.0 milestone Oct 3, 2019
@tsteur
Copy link
Member

tsteur commented Oct 3, 2019

I see. It only happens for some widgets but not for others. In this case it couldn't find the widget element in https://github.com/matomo-org/matomo/blob/3.x-dev/plugins/Dashboard/javascripts/dashboardObject.js#L450-L452

@tsteur tsteur self-assigned this Oct 3, 2019
@mattab mattab changed the title TypeError: $widget.dashboardWidget is not a function Dashboard may generate JS error: TypeError: $widget.dashboardWidget is not a function Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants