Stats for my campaign have an error

jera

Member
Hello,

Since I've updated MW, I've noticed an error, the graphics bar is not displayed correctly. I check the code and this is due to an error in a comma, because the correct thing would be to print a point.

472.jpg


HTML:
<div class="progress" style="width: 11,29%"></div>

I change the comma by the point and the problem is solved. (Attention in the width)

HTML:
<div class="progress" style="width: 11.29%"></div>

My question is Where do I have to change so that this is fixed in all campaigns?

Thank you.
 
@jera - This seems like an issue caused by the used language which formats the floats using a comma instead of a dot.
You could find the PHP code which is only in the views and replace it like:
PHP:
// old:
<div class="progress" style="width: <?php echo $campaign->stats->getClicksRate(true);?>%"></div>

// new:
<div class="progress" style="width: <?php echo (float)str_replace(',', '.', $campaign->stats->getClicksRate(true));?>%"></div>

I'll fix this for the next release.
 
@jera - This seems like an issue caused by the used language which formats the floats using a comma instead of a dot.
You could find the PHP code which is only in the views and replace it like:
PHP:
// old:
<div class="progress" style="width: <?php echo $campaign->stats->getClicksRate(true);?>%"></div>

// new:
<div class="progress" style="width: <?php echo (float)str_replace(',', '.', $campaign->stats->getClicksRate(true));?>%"></div>

I'll fix this for the next release.

Thank´s :D
 
Back
Top