Fontsize not working after upgrade

Hello all,

After upgrading to 2.4.8, the fontsizer isn’t working within journal pages, only in the administrator’s pages.

I can’t figure out why, since there are no javascript errors being displayed on the debuggers on Chrome or FF.

It doesn’t work even with the original fontsize plugin and fontController.js.

Could this be added as the fontsizer?
Here’s a working example without the cookie (http://www.shopdev.co.uk/blog/font-resize.html#)

//
// JQuery Text resize + Cookie recall
// by Jonny Kamaly
// based on script written by Faisal & Homar
//

var sitefunctions = {
textresize : function(){
// show text resizing links
$(“.FontSize”).show();
var $cookie_name = “sitename-FontSize”;
var originalFontSize = $(“html”).css(“font-size”);
// if exists load saved value, otherwise store it
if($.cookie($cookie_name)) {
var $getSize = $.cookie($cookie_name);
$(“html”).css({fontSize : $getSize + ($getSize.indexOf(“px”)!=-1 ? “” : “px”)}); // IE fix for double “pxpx” error
} else {
$.cookie($cookie_name, originalFontSize);
}
// reset link
$(“.FontSizeReset”).bind(“click”, function() {
$(“html”).css(“font-size”, originalFontSize);
$.cookie($cookie_name, originalFontSize);
});
// text “+” link
$(“.FontSizeInc”).bind(“click”, function() {
var currentFontSize = $(“html”).css(“font-size”);
var currentFontSizeNum = parseFloat(currentFontSize, 10);
var newFontSize = currentFontSizeNum*1.2;
if (newFontSize 11) {
$(“html”).css(“font-size”, newFontSize);
$.cookie($cookie_name, newFontSize);
}
return false;
});
}
}

$(document).ready(function(){
sitefunctions.textresize();
})

Hi @ramon,

The last significant code change in font size plugin was in 2014.

I have no problem locally with it, is you installation public?

Cheers,
Bruno

Hello @beghelli,

Unfortunately, it’s not public yet.
It must be some CSS issue, as there are no Javascript errors related to it. I did find an old post that changed the fontsizer code, allowing more flexibility on the translation side, as most of it is hardcoded in the JS.

The site also has an alternate CSS, and part of it is copied from the theme being used, but much smaller. However, it works on the admin and not on the journal, which bugs me a lot.

Not too easy to fix, and I have little time to spend on this, so I ended up creating my own fontsizer plugin, with a different code, from the working example I posted (not the copied code, as it has some issues, missing commas, etc.).

It’s also easier to maintain on future upgrades and patches…