[pmwiki-users] Fix blogit for use with PHP 5.5

Tiger!P pmwiki-tigerp at tigerp.net
Sun Nov 2 05:08:30 CST 2014

On Thu, Oct 30, 2014 at 05:41:42PM -0400, DaveG wrote:
> On 10/30/2014 1:58 PM, Tiger!P wrote:
> >>>This does not result in the error message, but when I go to the new blog
> >>>page (/Site/BlogIt-Admin?action=bi_ne ) some blogit codes are displayed
> >>>on the page. I don't know if this was the case before PHP5.5, but don't
> >>>think so.
> >>>
> >>>Blog Title: (:blogit list "$:entrytype":)bi_PageType/Type:
> >>>(:blogitend:)(:blogit list "$:blogid":)bi_BlogList/BlogID: (:blogitend:)
> >>>Tags: (:blogit list "$:entrystatus":)bi_StatusType/Status:
> >>>(:blogitend:)(:blogit list "$:entrycomments":)bi_CommentType/Comments:
> >>>(:blogitend:)
> >
> >This problem still exists.
> >And now the /Blog/Main page does not have any blog posts anymore. Also
> >the list of recently written is empty.
> >But the Categories contains a list of tags and when I select a tag, I
> >see a link to the blogpost which has that tag.
> >
> >So I think something is not quite right yet.
> >
> >Hopefully DaveG can give some advice.
> I suspect this error is not related to PHP5. I've applied your patches, and
> the test site seems to work (ref http://wiki.solidgone.org/BlogIt/Main).
> For others testing this out, ensure you have updated to the latest version
> of PMWiki, load the new version of PmForms, ensure your skin is PHP5
> compatible, and ensure other cookbooks you include are also compatible.

I use the Enlighten skin [1] and I don't see any warnings in the webserver
I will see if I can install the pmwiki directory on a system with an
older php version.

> Quick questions:
> 1. Tiger!P: With your patch file, why are you making the change to
> $PageTextVarPatterns, from #blogit_(\w[_-\w]*)  to #blogit_(\w[_\w-]*)?

To get rid of the warning "PHP Warning:  preg_match_all(): Compilation
failed: invalid range in character class at offset 20 in
/home/tigerp/www/pmwiki-2.2.62/pmwiki.php on line 797"

[1] http://www.pmwiki.org/wiki/Skins/Enlighten

A random quote:
A man is a maze of brambles in darkness and even does not know the way.

More information about the pmwiki-users mailing list