BlogIt Follies

Sometime in mid-June BlogIt on this installation started throwing errors, with no configuration changes.
Something on the server... but what?

BlogIt is not compatible with PHP 5.5, which I proved multiple times as I tried to convert the markup (some of it converts... more on that later).
Ultimately, I could get it to work by specifying PHP 5.4 and fixing one line of markup

See the below messages for more notes which I will inline

On 2014-12-16 17:33, Mark Lee wrote:

    ERROR: pat=/(\[\[#blogit_(\w[_-\w]*)\]\](?: *\n)?)(.*?)(\[\[#blogit_\2end\]\])/s

Petko: I believe this was fixed in recent BlogIt versions; the part


should probably be written


It is subsequently noted that there has been no updated BlogIt version.

However, applying the above update did fix the problem I had with PHP 5.4


Change $PageTextVarPatterns[''] = '/(\[\[#blogit_(\w[_-\w]*)\]\](?: *\n)?)(.*?)(\[\[#blogit_\2end\]\])/s'; #[1]
to $PageTextVarPatterns[''] = '/(\[\[#blogit_(\w[-_\w]*)\]\](?: *\n)?)(.*?)(\[\[#blogit_\2end\]\])/s'; #[1]

This is line ~143.

Additionally, I found the following markup to work (email thread source):

# original
// Markup('blogit', 'fulltext', '/\(:blogit (list|cleantext)\s?(.*?):\)(.*?)\(:blogitend:\)/esi',
//      "blogitMU_$1(PSS('$2'), PSS('$3'))"
// );

## This is non-working, as it appears in an email
## NotE: the line is chopped off by the email
// Markup_e('blogit', 'fulltext', '/\(:blogit
//  (list|cleantext)\s?(.*?):\)(.*?)\(:blogitend:\)/si',
//         function ($m) {
//             echo("blogit nonsense: ");
//             $func = 'blogitMU_'.$m[1];
//             return $func($m[2], $m[3]);
//         }
//   );

## If you fix the regex to be on a single line, the above will work
## this version has an exterior, non-anonymous function because: REASONS
Markup_e('blogit', 'fulltext', '/\(:blogit (list|cleantext)\s?(.*?):\)(.*?)\(:blogitend:\)/si',

function bimod($m) {
            // echo("blogit nonsense: ");
            // print_r($m);
            $func = 'blogitMU_'.$m[1];
            return $func($m[2], $m[3]);