DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:changelog

Changelog

The changelog is stored in per-page changelog files, with a recent changes cache. The recent changes cache is kept in /data/meta/_dokuwiki.changes and trimmed daily. The per-page changelogs are kept in /data/meta/<namespace>/<pageid>.changes files. This change log allows the full life-cycle of page creation, deletion, and reversion to be tracked.

Changelog Format

The changelog is stored as a plain text file with one changelog entry per line. Each changelog line contains a tab separated list of fields.

<date>\t<ip>\t<type>\t<id>\t<user>\t<sum>\t<extra>\n

<date>  = Unix timestamp
<ip>    = IPv4 or IPv6 ip address
<type>  = Log line type (see below)
<id>    = DokuWiki page id
<user>  = DokuWiki user name (if logged in)
<sum>   = Edit summary or action reason
<extra> = Field for arbitrary type specific data.
          Note: May NOT contain "\t" or "\n" characters.

Line Types

The log line type is an arbitrary length string. All single character <type> values are reserved for the DokuWiki core, while multi-character <type> values are allowed for experimental and user defined log line types. Note that <type> is case sensitive. The <type> field is to be tested with === not substr.

Core Types

Type Name Extra Notes
C create
E edit
e minor edit only available to logged in users
D delete changelog and attic preserve page history
R reverted revision edited to revert the page user may have edited the revision they started with

Keeping the Changelog

Do not delete the /data/meta directory. It now contains changelog information that can not be regenerated from the other wiki data.

Rebuilding The Changelog

In case you accidently deleted the <dokuwiki>/meta/_dokuwiki.changes see Tips & Tricks: Rebuilding Your Wiki Change Log.

Importing

:!: The following information only affects you if you upgrade from a DokuWiki version older than 2006-11-06! :!:

The old changelog is imported automatically if it exists.

Note: Very large wikis running on servers with php in “safe mode” may run out of time because the execution time limit can not be increased by the code. If necessary, the import can be done on another server that is not in “safe mode”. The /data/meta directory with the imported changelog can then be copied to the “safe mode” server.

Note: On very slow moving wikis $conf['recent_days'] (which defaults to 7 days) should be changed to a more appropriate value to get “Recent changes” page populated.

Importing a large old changelog can require more memory than PHP's usual 8MB limit. If the import fails, look in your webserver error log for a PHP error, something like Fatal error: Allowed memory size of 8388608 bytes exhausted. If you see this, temporarily increase PHP's memory limit in php.ini, restart the webserver, and then try the import again.

Verifying Import

The “do=check” action will report if an old changelog exists and is being or has been imported. If the import ran out of time, “do=check” should issue a warning that the import did not finish. Try to the import again remove the /data/meta/_dokuwiki.changes and /data/meta/_dokuwiki.changes_* files.

After the old changelog has been successfully imported, the “do=check” action might still report that an old changelog exists. This is fine and by design. But if the error “Importoldchangelog plugin not disabled after import” persist as well each time a “do=check” is performed, you'll have to disable the plugin using the Extension Manager.

devel/changelog.txt · Last modified: 2018-05-30 15:25 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki