[dokuwiki] Re: Problem with DokuWiki and PHP 5.1

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 22 Feb 2006 17:52:16 +0000

Jonathan Arkell wrote:

I've been having this problem for ages now.  It seems on random pages, I
get this crazy parse error:

Fatal error: Call to undefined method syntax_plugin_box::accepts() in
/var/www/jonnay.net/wiki/inc/parser/parser.php on line 100

now, it may be syntax_plugin_box that doesn't have the method, or it may
be any other given plugin.

If I see the problem and restart apache, then the error goes away, for a
little while, but it always seems to return.  For awhile there I thought
it was APC messing stuff up, but I have since turned that off, and the
error persists.

Hi,

This appears to me to be a php problem more than dokuwiki.

Can you confirm what version of Dokuwiki you are running and your server & OS details.

accepts is a method on class Doku_Parser_Mode. The class Doku_Syntax_Plugin extends that class and redefines the accepts method. The last line in the redefined method is return parent::accepts($mode);. The box plugin (all syntax plugins) extends the Doku_Syntax_Plugin class. The standard box plugin[1] doesn't redefine the accepts method (some plugins do).

So, unless I am way out in my understanding of php objects, scope resolution and the use of parent:: - quite possible :-) its not a Dokuwiki problem, as such I have no idea how to work around it.

Cheers,

Chris

[1] there is a patch for the box plugin to allow nested boxes which does redefine the accepts method and also ends with a last line return parent::accepts($mode);


-- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: