phpList version 2.10.x - Code Enhancements

A Curious Bug

small phplist logoThis was the most epic tale of man against bug which required a monumental effort in terms of resources and financing to resolve, ever to be told..... wait... have you gone off script again well... just thought we needed to set the scene .. to capture the readers imagination.


As you can see from the four images below the effects of this bug that only affects "The One" are quite dramatic in that it literally decimates page formatting. Creating a test page that omitted the core element of the phpList admin page (index.php) but loading all the CSS that is required to format Admin as well as my default page style resulted in a nicely formatted page. Wrap index.php with the default page style and we have the problem again.

The problems are

  • Fonts are larger and in some cases greater than their line height.
  • Top menu default colour has changed and hover function not working
  • Ribbon menu, loses it's formatting, the date and it's drop down sub menu
  • The right-hand side 'div' containing the Search and Admin navigation moves below the main 'div'
  • Admin menu items bounce because of font size and line height differences
  • Enter and Password buttons lose their CSS formatting

Nice images of the bug at work

A group of four images showing before and after effects of the curious bug that only affects the browser in which we all trust....

Admin screen - no bug
image 1.. Admin login screen with the bug
image 2.. Admin login screen without the bug
image 3.. Send message Format option with the bug
image 4.. Send message Format option without the bug

How to Kill 'the' Bug without a Hattori Hanzo Sword

Sometimes I like quirky off the wall anyway how to kill the bug, very very simple. It only required the hashing # of one line of code at the beginning of index.php. Doing this had no affect on the operablility of phpList Admin nor any of the other dominant browsers that we all love. But on "The One" the effect was truly dramatic, page formatting looked as it should and all the menus operated as they ought to.

In fact it has taken longer to write this and collate the images than it actually took to solve the problem and after several versions of phpList during which time it was a case of ... Well it works fine in my main browser so why bother getting it to work when no one else is going to see it.... but then I needed a challenge and getting it to display correctly with "The One" became an all consuming passion..... not really just an hour or so. But now I can safely test other modifications without worrying unduly. So where is it, what did you do....

if (isset($_SERVER["ConfigFile"]) && is_file($_SERVER["ConfigFile"])) {
#  print '<!-- using '.$_SERVER["ConfigFile"].'-->'."\n";
  include $_SERVER["ConfigFile"];
} elseif (isset($cline["c"]) && is_file($cline["c"])) {
#  print '<!-- using '.$cline["c"].' -->'."\n";
  include $cline["c"];
} elseif ($GLOBALS['commandline'] && isset($_ENV["CONFIG"]) 
       && is_file($_ENV["CONFIG"])) {
#  print '<!-- using '.$_ENV["CONFIG"].'-->'."\n";
  include $_ENV["CONFIG"];
} elseif (is_file("../config/config.php")) {

# AG-P mods Either # (as shown) or Remove the next line as it screws up IE	
# print '<!-- using ../config/config.php -->'."\n";
# AG-P mods End

  include "../config/config.php";
} else {
  print "Error, cannot find config file\n";

All photographs & images are the copyright of Alan G Fairhall and may not be reproduced or downloaded without express permission from the photographer