@mneudert opened this Pull Request on July 19th 2017 Member

As discovered in #11874 the page overlay breaks when the overlayed page contains it's own version of jQuery. To be specific a version of the 3.x range.

Looking at the console log the culprit is https://api.jquery.com/size/ not being available on a selector result. It was dropped in 3.x after being deprecated since 1.8. And the jQuery from the opened site replaces the one packaged with Piwik.

This patch replaces all calls I could find with the suggested .length access. There are 2 additional calls in the AnonymousPiwikUsageMeasurement plugin I know of but those need a separate PR.

For good measurement I replaced all calls to size() with a boolean style .length access. If the more prevalent style should be a real integer check like .length > 0 I will happily adjust them.

This Pull Request was closed on July 20th 2017
Powered by GitHub Issue Mirror