keainanhai (keainanhai) wrote in lj_dev,
keainanhai
keainanhai
lj_dev

Fix Client "Block" on stats.bml

Finally last night, I got enough motivation to work on the stats.bml page.

What happens: When you finally get enough different types of clients so that the stats.bml page displays more then one type (usually the one being the web client), the page will display odd. For example the H1 and description of Client Usage will display right below the Age H1 and description and then the actual list of clients and how many users there are using them will display below the age demographics section. So it breaks up and displays incorrectly.

What's wrong: The offending line of code is line 181 in stats.bml. This line is:

chop $ret; chop $ret; # remove trailing ", "

This line SHOULD be:

chop $out; chop $out; # remove trailing ", "

It uses the chop function on the incorrect buffer (return buffer vice output buffer), which causes two HTML characters to be stripped away per the loop iteration.

So if you're looking to fix that display issue, just replace line 181 with what I've put above.

Thanks to Rafael @ WithinWindows for helping find the fix.
Tags: bugs, bugs: stats, server, server: stats
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 6 comments