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

WP 5.6 / jQuery 3: Size is not a function #414

Closed
MalteP opened this issue Jan 19, 2021 · 1 comment
Closed

WP 5.6 / jQuery 3: Size is not a function #414

MalteP opened this issue Jan 19, 2021 · 1 comment

Comments

@MalteP
Copy link

MalteP commented Jan 19, 2021

Using WP Matomo on Wordpress 5.6 shows the following error in the browser console:
Uncaught TypeError: jQuery(...).size is not a function

Clicking through the debugger i found out that it's caused by the Tour plugin:
https://github.com/matomo-org/wp-matomo/blob/c7b6b0defd115199ad5a71d748d46db9b5a38b51/app/plugins/Tour/templates/engagement.twig#L53

The documentation shows that the .size() method has been removed in jQuery 3, so it should be replaced by the .length attribute:
https://api.jquery.com/size/

This change resolved the error, but i did not test the Tour plugin as a i don't know how it is supposed to work.

Best regards,
Malte

@tsteur tsteur closed this as completed in 84291c0 Jan 19, 2021
@tsteur
Copy link
Member

tsteur commented Jan 19, 2021

Thanks for this @MalteP very appreciate this find and thanks for directly finding the solution which makes it easy. I will also push this fix to Matomo core shortly and check other plugins for same issues.

tsteur added a commit to matomo-org/matomo that referenced this issue Jan 19, 2021
Which is used in WordPress 5.6+

Also adjusted few premium features with similar issue. refs matomo-org/matomo-for-wordpress#414
sgiehl pushed a commit to matomo-org/matomo that referenced this issue Jan 20, 2021
Which is used in WordPress 5.6+

Also adjusted few premium features with similar issue. refs matomo-org/matomo-for-wordpress#414
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