cacherevisionseraser plugin by JustBurn
Erase entire cache and/or old wiki revisions
Last updated on 2009-06-27. Provides Admin.
No compatibility info given!
Current Version: 1.6.3
NOTE: planetaclix and drunkencoders mirror has been deleted, sorry for the inconvenience
This admin plug-in allows you to erase the entire cache and/or old DokuWiki revisions.
Only use this plug-in if you want to clean up your DokuWiki or if the cache gets corrupted.
I won't take any responsibility for data lost due to wrong plug-in usage.
Once old revisions are erased; there's no way to restore them.
NOTE: Older history has been deleted to not make the Wiki page too long, consult readme.txt for the full history.
More translations are welcome!
New mirrors are welcome!
http://www.firstai.de/ext/dokuwiki_plugin_cacherevisions_eraser.zip - Version 1.6.3 - hosted by kajus http://deeplayer.com/mirror/cerase/v1.6.3/dokuwiki_plugin_cacherevisions_eraser.zip - Version 1.6.3 - hosted by chuck http://dklight.info/_media/proyectos:dokuwiki:dokuwiki_plugin_cacherevisions_eraser.zip - Version 1.6.3 - hosted by dklight http://dklight.info/_media/proyectos:dokuwiki:dokuwiki_plugin_cacherevisions_eraser.tar.gz - Version 1.6.3 (.tar.gz) - hosted by dklight
Well… why not? Probably useful for UNIX users, it mainly serve to check if the file is not corrupted or modified. Please don't modify the values :(
Q: Is it safe to erase DokuWiki cache?
A: Yes, but erasing indexed-search files isn't recommended.
-
Q: Is it safe to erase old revision pages?
A: Before doing that, make sure all your wiki pages are clean from spam since you can't revert back once all of them are deleted.
-
Q: Help! I don't know how to use this plug-in and I'm afraid to accidentally damage my wiki.
A: Sorry, there isn't any newbie document available atm. Follow the "Download & Install" carefully and don't forget to modify the config.php if you aren't the only administrator using the wiki.
-
Q: How to modify “configs.php” from the web?
A: v1.5.2 and above you can modify only if “configs.php” doesn't exist.
-
Q: Is it possible to revert old revisions erasure?
A: Nope, once they are deleted, they cannot be restored or undeleted.
-
Q: Is it possible to backup old revisions into a single ZIP file for example and delete them in the wiki?
A: It isn’t possible to backup the files with this plug-in. You can try Doku Zip Backup or BackupTool for DokuWiki plug-ins for this purpose.
-
Q: Installed the plug-in correctly but I'm getting the error “ERROR: Missing or incompatible configurations file (ERR: 1)”.
A: That's normal and always happen when you freshly install the plug-in. The error tells you that there's no configuration file, you just need to setup the configurations into that page and click “Create config.php”… Then “Re-analyze” to refresh the configurations.
-
Q: Installed a newer version of the plug-in and transferred the old config.php into that directory but I'm getting the error “ERROR: Incompatible configurations file (ERR: 2)”.
A: The newer version of the plug-in may have major changes into the configurations file and isn't recommended or safe to use with old configurations. Please delete the old config.php, run the plug-in, configure all the options and click “Create config.php”.
-
Q: Installed a newer version of DokuWiki and getting errors 3, 4, 5, 6 or 7.
A: It shouldn't happen but if it does please contact me, don't forget to tell the DokuWiki version your using!
-
Q: What does the option “Menu position inside the Admin list (Def: 67)” mean?
A: It allows the administrator to organize where the plug-in will be listed in the administrative tasks/menu, the lowest number will be listed on the top of the list.
-
More Q & A, please?
Any problems, bugs or improvements should be posted here.
NOTE: If someone find a critical incompatibility, please notify me via E-mail with the name of the plug-in in the subject, so I will be much faster to reply and solve the issues. Thank you!
This plugin uses hard coded paths to data/attic and data/cache directories. If you have changed your installation, for example in accordance with security tips, you should change corresponding lines in cacherevisionserase/admin.php:
94: if ($this->rmeverything(DOKU_INC.'data/cache')) { 116: if ($this->rmeverything(DOKU_INC.'data/attic')) { 188: if (strcmp($fileglob, DOKU_INC.'data/cache') == 0) return true; 189: if (strcmp($fileglob, DOKU_INC.'data/attic') == 0) return true;
— Kibi 2006-06-18 18:39
Thank's for the bug report, fixed in version 1.2 :) — JustBurn 2006-06-26 09:56
The plugin doesn't work, when I try to use it, the following prompt appear:
Invalid auth mechanism
What I can do, to resolve that?
Thanks for the bug report, fixed in version 1.2 :) — JustBurn 2006-06-26 09:56
I have the same Problem with it. Can anybody help with this problem ?
It's fixed in version 1.2 :) — JustBurn 2006-06-26 09:56
Is it possible to split the plugin into cache-eraser and revision-eraser or to deactivate it in a config file? I don't want an admin to clean the revisions so easily (although I can allways revert to a nightly backup) — Hoberion 2006-06-26 16:09
Yes, configurations will be implemented in version 1.3, thanks for the idea :) — JustBurn 2006-06-27 01:12
Issue: when I delete the cache it also deletes the search files.. so there are no results after a delete (I tested it before a delete and got results for a search, right after a delete cache the results were empty. The Searchindex plugin seems to solve this — Hoberion 2006-06-28 21:08
Didn't noticed that cleaning cache also cleaned indexed search words, disabling “Indexed-search files” selection seems to fix the issue, thanks :) . — JustBurn 2006-06-30 00:59
You may install searchindex plugin and re index whole of your wiki after cleaning up. — Kibi 2006-07-04 16:41
Issue: backlinks disappear after a cache clean, running the searchindex plugin afterward doesn't solve this issue, an edit of a page linking to that page seems to solve it for that specific page, browsing seems to solve this :) — Hoberion 2006-06-28 21:31
It seems a complex problem, backlinks information is inside the cache himself (data inside extension ”.i”?)… although browsing fixes the problem (because cache is re-generated) you can set to turn on/off selection of some common files in v1.3, hope that helps :) . — JustBurn 2006-06-30 04:40
I found there is directory data/meta that contains a lot of “garbage”. As far as I understand, it's place where DokuWiki holds information about indexing status and something like that.
And sometimes orphan .lock files stays in data/pages directory. If you start creating page, and cancel it, orphan lock file will be created. Your utility could hunt for such files. — Kibi 2006-07-04 16:45
Thanks for the suggestions, they are implemented in v1.4 :) — JustBurn 2006-07-07 01:52
Hi, A couple of ideas for this plugin.
— Christopher Smith 2006-07-07 10:46
The configurations should only be changed by the person who has access to website files (System Admin), he can allow all features to be accessed by a Wiki Admin through so a Wiki Admin really don't need to touch the configurations. NOTE: System Admin may not want the “Revisions Eraser” to be enabled, see Hoberion comment above.
Thanks for the internal variables correction, they will be supported in the next version. :) — JustBurn 2006-07-09 02:28
In latest wiki conf the 'datadir' has changed to 'savedir', So you need to edit admin.php, change line 69 from “$this→pagesdir = $conf['datadir'];” to “$this→pagesdir = $conf['savedir'];”
Added support for v1.4.2 in case the 'datadir' doesn't exist… if there's any problem regarding to this, please email me or reply in this wiki — JustBurn 2006-10-17 20:49
Deleting meta data directory gives empty page (error?) and does nothing. If one did not choose to delete meta data everything goes okay.
What DokuWiki version are you using?
Can you tell if $conf['meta'] pointing to the correct metafiles directory?
If the server is using Apache, can you provide the error log's lines when this happen?
Please email me if you can find the source of the problem and I'll short it out :) — JustBurn 2006-12-25 05:56
Publish the file better without the version number in the filename, for updates with the pluginmanager
Thanks, didn't noticed that the Plugin Management allowed to automatically install from this ZIP package. — JustBurn 2007-01-18 20:02
Cool
, thanks for the plugin.
Downloaded 1.4.3, but when I tried to run it (to get rid oft he old versions of pages that have accumulated) the dialog box said Erasing all old revisions has been disabled
Is this a general thing or is it a limitation of my DokuWiki installation. The plugin - according to the documentation - is just what I was looking for to delete the old versions but it doesn't want to do it…
Cheers, Edward
In “<dokuwiki directory>/lib/plugins/cacherevisionserase/configs.php”, set $this→configs['allow_allrevisdel'] to true. — sfidanza 2007-01-23Yes, why didn't I see that. Works brilliantly now, thanks, Edward
Hello JustBurner, hello every one, Trying it under Apache 2.2 on WinXP, I get this error message :
Purge Cache/Révisions version 1.4.3 Couldn't remove directory '/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*........'. Error erasing all revisions, check file permissions.
I've found a (bad ?) trick to correct the problem.
// ========== From this ========== function rmeverything_revis($fileglob, $basedir) { (......) } else if (is_dir($fileglob)) { (......) } // ========== To this ========== function rmeverything_revis($fileglob, $basedir) { (......) } else if (is_dir($fileglob) && (strstr($fileglob, '*') === false) ) { (......) }
Thanks for the plugin, it's very cool. — Jeff 2007-01-25 17:07
I've updated to Apache 2.2 and PHP 5.2.0 and faced the same problem as you, I've rewrote the search engine better in v1.5.0 and now it should work perfectly for you. — JustBurn 2007-02-28 02:04
I have also observed the error noted above “Couldn't remove directory…” w/v1.4.3 on a Windows server w/IIS. If the change noted above to the “rmeverything_revis” function fixes the problem, can the fix be made official by applying the change, increment the version number and making the updated version available through the plugin manager? —GaryV 2007-02-08 21:15
Sorry for the long delay, to tell the trust I've totally forgot about this project and only remembered it today… the good news is “yes”, v1.5.0 is out! :) — JustBurn 2007-02-28 02:04
I have moved data from its default location with all default subdirs within it and changed $conf['savedir'] respectively. After applying the plugin, cache and attic were erased and meta and locks remained untouched. So I have old list of recent changes without any existing revision files. Should I change also $conf['lockdir'] and $conf['metadir']? But why if they are in their default location, that is within the data directory? Thank you for the plugin. Alexander 26.02.2007 0:29:09
Please try v1.5.0 and check if it fix all the issues, fixed the meta variable name based from the latest DokuWiki release, this probably can fix the problem you're having — JustBurn 2007-02-28 02:04
Meta directory is OK, but locks is the same. Debugger shows correct variable values, and the deletion process is successful, but there's no *.locks files in the list of deleted files. — Alexander 2007-03-02 03:49
Please check v1.5.1, tried to email you back because of the Russian language translation but your email seems to filter @hotmail.com accounts. :/ — JustBurn 2007-03-05 18:20
Thanks! Now it seems to work fine. I'm not Kibi who made a Russian language file, but I've updated the translation. Mail it to you? — Alexander Zubkov 2007-03-05 21:22
Oh sorry, got confused because his first real name is Alexander too (What a coincidence!)… Well, managed to get a new email account, so please send it to the new email address → — JustBurn 2007-03-07 06:08
Version 1.5.1 handles configs.php incorrectly: If you set, e.g., “cache_del_metafiles” to -2, it still shows the item checked in the admin panel. Please rewrite this code. — Robert Riebisch 2007-03-27 17:10
Thanks for the bug report, v1.5.2 should handle it correctly. — JustBurn 2007-03-30 01:58
I just manually updated this plugin, and found a small bug. I updated by deleting the existing cacherevisionserase directory and dropping the new one in place. The first time I loaded the admin page, it allowed me to create the configs.php file (nice). However, when it did, it created the line '$this→configs['allow_allcachedel'] …' twice and didn't create the line '$this→configs['allow_allrevisdel'] …' at all. This isn't a major bug since we just have to copy the line from the “configs.in.php” distribution file. — Gary 2007-05-02 19:11 EDT
Thanks for the bug report (Again! :P), although the 2nd was implemented correctly (checked for 'allow_allrevisdel'), the writing to the configs.php wasn't (wrote 'allow_allcachedel')… my bad, really did a dumb mistake :\ … anyway there's v1.5.3 that fix it. — JustBurn 2007-05-04 17:25
The first download link doesn't work at all; site not found. The second appears to work, but then I get a message “No plugins found, or there has been an unknown problem during downloading and installing.”, I could provide a mirror, if you like. I'll send you an email.
Yes, the first link seems offline at the moment, but the second link works fine without any error message. I've replied your e-mail. — JustBurn 2007-07-03 01:32
Fix the Update plugin version (date) in the plugin scripts.
getInfo().date ? Isn't the date of the creation of the plugin ? — JustBurn 2008/04/01 14:51I'm not sure what do you mean, but
— Ilya Lebedev 2008/04/01 16:40then getInfo().date should be the last update date? Nobody warned me about that since version 1.0Yes.(e.g. 'date' ⇒ '06-05-2006', to 'date' ⇒ '31-03-2008',)
I don't have anything else to change/add right now, should I release 1.6.1 with only that change made? — JustBurn 2008/04/02 18:54It's just nice to see when the last actual update took place. Yes, please update this with the next releases. If you use CVS/SVN you could set $Date$ placeholder there to have the actual date. — Ilya Lebedev 2008/04/03 12:22Ok, it's done on v1.6.1, from now on the getInfo().date will reflect the latest version :) — JustBurn 2008/04/10 18:43
Would it be possible to extend the plugin, so what only in a certain namespace the old revisions are deleted? Roland Spatzenegger 2008/05/26
That should require a lot of work (and time) to be implemented, but I'll keep that in mind if I decide to improve the plug-in greatly. — JustBurn 2008/09/07 18:34
There is a problems with the Discussion Plug in!! http://www.dokuwiki.org/plugin:discussion in the META directory there are also the discussions stored as “*.comments” files. Is there a way to prevent deleting this files`? What can be changed in sources to do that? Micha Meyer 2008/08/18
Sorry to only notice the posts today, I've been away for so long.
Version 1.6.2 will patch that issue, thanks for the report. — JustBurn 2008/09/07 18:34
Problem is solved! Thank you!
Micha Meyer 2008/09/09
It seems to me that version 1.6.2 does not delete at least some meta files. I'm using it with version 20090214 of Dokuwiki on a debian linux computer.
The meta files are in a subdirectory of /var/lib/dokuwiki/data/meta/.
Perhaps cacherevisionseraser should search subdirectories for meta files to delete.
Thanks, Kingsley G. Morse Jr.
cacherevisionseraser does search subdirectories…
PHP have full permission on all the meta folders/files (including subdirectories)? there is any link file/directory inside it? what type of files that doesn't get deleted? — JustBurn 2009/06/25 04:00