About - cosmocode/dokuwiki-plugin-move GitHub Wiki
This is a major refactoring of the move plugin.
Instead of having nearly all the functionality in one single helper plugin, the plugin was split up into several components.
There is no longer a distinction between renames and moves as they are essentially the same. Thus operations no longer work with names + namespaces, but work on full page or namespace IDs only.
The interface to start a page or namespace move was redone accordingly and simply lets you enter the new ID. A change that hopefully should make the interface much easier to understand.
The mechanism to handle complex moves was extended from moving a single namespace to cover an arbitrary number of move operations. This is called a "plan" internally.
A new interface allows the creation of more complex move plans using a drag'n'drop interface with a tree like representation of pages and media files.
Before starting the execution of a move, a preview of all operations and affected pages is shown. In addition all operations are logged to a logfile in the cache directory. There is currently no interface to view these logfiles though - they have to be accessed via file system.
Execution of the move plan was overhauled and simplified. Error handling should be a little bit simpler now (by directly accessing the global $MSG array instead of using output buffering), though ideally it should be redone using Exception in another refactoring.
The code for the custom indexing mechanism has been removed as it is now part of DokuWiki core. All other code has been updated to use new DokuWiki features like the $INPUT handler.
Options have been added to skip error on plan execution and to have links adjusted in all affected pages immediately after the move.
Initially the idea was to temporarily disable page subscriptions when links are adjusted. However this proved to be difficult. The simpler solution is to mark link adjustments as "minor" changes which excludes them from automatic mailing automatically. This can be done by a new config option of the plugin.
A simple page rename function can be enabled for non-managers. Access to this feature can be controlled via a group/user setting in the config. It also automatically integrates into the page tools menu of the default DokuWiki template.
Metadata was adjusted to keep a proper stack of link changes and keeping track of the page's original name before all pending move operations. This allows to add more move info without the need to apply previous move rewrites first. This is done automatically now during the execution of page moves which should avoid multiple rewrites of pages during a move.
The plugin now also tries to rewrite links to non existing pages if their target is pointing to a moved namespace. There are some edge cases where that might fail as described in cosmocode/dokuwiki-plugin-move@d791aa26159b5c061bbe4fc5328d5b6db9e343d3 - but for the majority of moves this should not be a problem.
Tests are still minimal. The original tests succeed and a few small new ones were added but more tests would definitively help. A Travis config was added to the repository, so it's ready for automated testing.
This plugin makes use of DokuWiki's include_once for JavaScript which is broken until splitbrain/dokuwiki@969df2f1a2855988cc9c14870869d05fd42037ad this fix needs to be applied manually to current stable releases or it has to be taken care that no other plugin includes JSON2.js (currently known: edittable).
Note: because some files were moved into sub directories previous installations should be deleted before reinstalling this version to get rid of any old files (this does not apply when updating via git of course).