afragen/events-calendar-category-colors — pull request #6 by WebBaker (2012-12-30 04:48:10+00:00)
Title: Legend labels - pjax/ajax refresh awareness

Andy - getting closer each time - thanks for bearing with me! Here's the background (to the undefined labels problem):

If superpowers are enabled the legend links are converted to spans. In my test the legend was included inside of table.php - actually positioning it right above the table element - and this happens to be inside the area that is reloaded during month-to-month navigation.

So, when the grid was rebuilt so was the legend. The superpower code then tried to convert the links to spans and succeeded.

In your case the legend was included _outside_ of the reload area, having been included in ecp-page-template.php, and so only needed to be prepared once ... however the superpower code was unaware of this and still tried to convert the links (which no longer existed, hence "undefined") to spans.

If you can test out the latest revision then we can hopefully put [this issue](https://github.com/afragen/events-calendar-category-colors/issues/3) to bed. It now checks the legend for links and only converts to spans if links are found, which is a fairly sensible measure I should really have thought of first time round :-/