WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Google Analytics for WordPress] Rendering bug? (2 posts)

  1. djpeanut
    Member
    Posted 5 years ago #

    Hi,

    I have a fairly markup-heavy page on my WordPress site which seems to end up in a mess once Google Analytics for WordPress has had it's way with the links. The page is at http://www.ride-earth.org.uk/podcast/. It seems to be failing to close the iTunes onclick link properly and then repeating several lines of the original code again.

    BEFORE:

    <div style="background-color:#CCE6C8;clear:both;border-bottom:2px solid #fff;text-align:center;margin:0 30px;padding:3px 10px">
    
    <a href="/podcast/episode-four-switzerland-to-austria/">Watch the previous episode</a>
     | next episode coming soon
     | <a title="Add the Ride-Earth podcast to your iTunes" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=260068214">subscribe with iTunes</a>
     | <a title="Download this episode directly from Ride-Earth.org.uk" href="http://ride-earth.stringfilms.tv/episode5.mov">download directly</a>
     | or add <a href="http://podcast.ride-earth.org.uk/podcast.xml">the feed</a> to your favourite podcast software
    
    </div>

    AFTER:

    <div style="background-color:#CCE6C8;clear:both;border-bottom:2px solid #fff;text-align:center;margin:0 30px;padding:3px 10px">
    
    <a href="/podcast/episode-four-switzerland-to-austria/">Watch the previous episode</a>
     | next episode coming soon
     | <a title="Add the Ride-Earth podcast to your iTunes" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=260068214" onclick="javascript:pageTracker._trackPageview('/outbound/article//podcast/episode-four-switzerland-to-austria/">Watch the previous episode</a>
     | next episode coming soon
     | <a title="Add the Ride-Earth podcast to your iTunes" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=260068214');">subscribe with iTunes</a>
     | <a title="Download this episode directly from Ride-Earth.org.uk" href="http://ride-earth.stringfilms.tv/episode5.mov" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://ride-earth.stringfilms.tv/episode5.mov');">download directly</a>
     | or add <a href="http://podcast.ride-earth.org.uk/podcast.xml" >the feed</a> to your favourite podcast software
    
    </div>

    The result is that the first two links are rendered twice, and that one of them is invalid javascript.

    Any ideas - it's a strange one...

  2. djpeanut
    Member
    Posted 5 years ago #

    Looking at it again, this entire stretch of code is being put in a single javascript function argument by the plugin (look at where the (' and ') occur). Browser is rendering the argument as HTML:

    onclick="javascript:pageTracker._trackPageview('/outbound/article//podcast/episode-four-switzerland-to-austria/">Watch the previous episode</a> | next episode coming soon | <a title="Add the Ride-Earth podcast to your iTunes" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=260068214');"

Topic Closed

This topic has been closed to new replies.

About this Topic