@dandv opened this issue on July 14th 2015

I've created a mirror of our signup page where we experience this error. Steps to reproduce: 1. Go to https://idorecall.com/static/bug-demos/piwi-classname.split/ 2. Enter some email 3. In the signup success page, click on the "F"acebook link/icon.

After a few seconds, the Chrome console displays

piwi.js:1390 Uncaught TypeError: node.className.split is not a function

The piwik.js is from July 1st and the line in question is var classes = node.className.split(' ');

The error occurs despite the checks for presence of className because the element in question is an SVG <use> and node.className is SVGAnimatedString {}. My markup is

<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A//iDoRecall.com/?signupref">
  <svg>
    <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#fa-facebook"></use>
  </svg>
</a>

http://stackoverflow.com/questions/12588913/svganimatedstring-missing-method-indexof suggests a possible solution.

A workaround is to add bogus classes to <svg> and <use> elements in the markup.

@mattab commented on July 14th 2015

Thanks for the report, the pull request is #8347

This issue was closed on July 20th 2015
Powered by GitHub Issue Mirror