Editing the Dokuwiki Authorstats
If a Dokuwiki Installation is used with an Active Directory, user names and accounts may change. In code, the Authorstats plugin reads Dokuwikis meta folder containing all information about site edits and creations, and generates the Authorstats table from it. For this, every unique string at the user name position is seen as an account, and listed separately in the table.
This means that after any change in user name, no matter if through individual modification, a new naming convention or switching to a different Active Directory, all edits from this point on are tracked as a new user. To avoid this and keep all pervious edit statistics even after a name change, the Authorstats plugin and Dokuwiki offer no obvious solution. The following can be done manually to migrate old meta entries to a new user:
- The meta directory under
DOKUWIKI_ROOT/data/meta/
needs to be opened.
- In the entire directory, all occurences of the old username need to be searched for and exchanged for the new username. For example, this can be done with a code editor like VS Code, which can exchange one string for another in the entire directory.
- As the Authorstats plugin generates cache files for the contribution inforation, said files need to be deleted for the changes to take effect. For this, the
_authorstats
folder underDOKUWIKI_ROOT/data/cache/
has to be deleted. - After deleting the authorstats cache, the wiki website may take a few seconds to load, as the cach files need to be regenerated.
- The contribution stats of the old account have now been merged with the new account :)