#1144041 type error after upgrade ($conf['syntax'] missing)

Package:
dokuwiki
Source:
dokuwiki
Submitter:
Andrew Worsley
Date:
2026-08-10 05:25:02 UTC
Severity:
normal
Tags:
#1144041#5
Date:
2026-08-10 03:37:50 UTC
From:
To:
Dear Maintainer,

 Just accessing any web page results in this error:
...
TypeError: dokuwiki\Parsing\ModeRegistry::__construct(): Argument #1 ($syntax)
must be of type string, null given, called in
/usr/share/dokuwiki/inc/parserutils.php on line 239
----

  The whole wiki is not accessible (I believe)

A quick google resulted in a suggestion :

"...This error happens because the $conf['syntax'] configuration parameter is
missing or empty in your DokuWiki setup. This frequently occurs after upgrading
to the "Mort" (Summer 2026) release, which introduces a new core configuration
setting for alternative markup engines. If the updater or container layout
fails to supply a default string value, the engine receives null and crashes.
..."

It suggested add missing config:

  $conf['syntax'] = 'dw';

to local.php

which did fix it for me

It also referred me to a few pages such as :
https://forum.dokuwiki.org/d/26097-mort-docker-missing-confsyntax-parameter-
triggers-a-typeerror

  Hope that helps.

Andrew

#1144041#12
Date:
2026-08-10 04:15:22 UTC
From:
To:
retitle 1144041 type error after upgrade ($conf['syntax'] missing)
severity 1144041 important
tag 1144041 + moreinfo
thanks

Hi,

thank you for your report.

I can't reproduce this after an upgrade, because When trying to
reproduce this error after an upgrade, because there is:

   $conf['syntax']      = 'dw';              //syntax flavor: 'dw',
'md', 'dw+md', 'md+dw'

in /etc/dokuwiki/dokuwiki.php.

Can you check if you're missing this?

Regards,
Daniel

#1144041#21
Date:
2026-08-10 04:15:22 UTC
From:
To:
retitle 1144041 type error after upgrade ($conf['syntax'] missing)
severity 1144041 important
tag 1144041 + moreinfo
thanks

Hi,

thank you for your report.

I can't reproduce this after an upgrade, because When trying to
reproduce this error after an upgrade, because there is:

   $conf['syntax']      = 'dw';              //syntax flavor: 'dw',
'md', 'dw+md', 'md+dw'

in /etc/dokuwiki/dokuwiki.php.

Can you check if you're missing this?

Regards,
Daniel

#1144041#26
Date:
2026-08-10 04:22:45 UTC
From:
To:
Yep I'm missing the syntax conf variable - e.g. a grep for syntax only
matches on a comment:

% grep syntax /etc/dokuwiki/dokuwiki.php
 * This is a piece of PHP code so PHP syntax applies!

#1144041#31
Date:
2026-08-10 04:22:45 UTC
From:
To:
Yep I'm missing the syntax conf variable - e.g. a grep for syntax only
matches on a comment:

% grep syntax /etc/dokuwiki/dokuwiki.php
 * This is a piece of PHP code so PHP syntax applies!

#1144041#34
Date:
2026-08-10 04:22:45 UTC
From:
To:
Yep I'm missing the syntax conf variable - e.g. a grep for syntax only
matches on a comment:

% grep syntax /etc/dokuwiki/dokuwiki.php
 * This is a piece of PHP code so PHP syntax applies!

#1144041#39
Date:
2026-08-10 04:37:03 UTC
From:
To:
great, so we know the problem. :)

now, how let's find out how this file got not updated and what we can do
about it to improve/fix that.

/etc/dokuwiki/dokuwiki.php is a "conffile" (that is a specially defined
status within dpkg), that means, on upgrade if local modifications are
detected, dpkg will ask the user to a) discard the modifications, b)
keep the modifications, or c) show the differences.

I presume you selected 'keep  modifications', which means the file
wasn't updated and instead, you should see a
/etc/dokuwiki/dokuwiki.php.dpkg-new or something like that.

Normally, we could just mark dokuwiki.php not being a conffile (all
files in /etc automatically have the status of a conffile, unless dpkg
is told otherwise; any other file outside of /etc is not a conffile by
default). However, that would mean, that any local modifications are
automatically discarded on upgrade, i.e. users loose their settings.

Of course, it's a bad idea to change dokuwiki.php in the first place,
all changes should go to local.php. However, users sometimes don't do that.

Now, I suggest to do the following:

   * keep dokuwiki.php a conffile for now

   * add a check in postinst so that after the package is installed
     (i.e. after the user has chosen to keep the old dokuwiki.php)
     we show a debconf warning message if the syntax option is missing
     and that that needs to be added, and advise the user to use
     local.php for modifications instead of dokuwiki.php.

     and/or we could simply add the syntax option if it's missing.

what do you think?

Regards,
Daniel

#1144041#44
Date:
2026-08-10 04:55:53 UTC
From:
To:
Yep I selected to keep local modifications as I worried about what local
mods would be lost...

I also do have a  /etc/dokuwiki/dokuwiki.php.dpkg-dist
and it does have the syntax entry:

  $conf['syntax']      = 'dw';              //syntax flavor: 'dw', 'md',
'dw+md', 'md+dw'

I am not the expert here - but I would prefer that it checks if it is
missing and adds it in with a warning that without a syntax entry it will
cause failure.

Thanks

Andrew

#1144041#49
Date:
2026-08-10 05:23:20 UTC
From:
To:
I concur, a classic user error.

I think that would be a policy violation and also a bad example.

How strong is the wording pointing people to local.php inside
dokuwiki.php? Maybe that could be improved.

Yes.

Please don't. That's going to explode in the face of all package
maintainers wo will spend weeks of their lifetime writing manual checks
for each and every incompatible change in packages during upgrades.

A package cannot ever touch a dpkg conffile in maintainer scripts.

Greetings
Marc