Most of the discussion below is obsolete, since JSPWiki 2.2 has page deletion built-in.

To delete a page, visit the article and click "Page Info". Under the "Page Info" tab (likely already highlighted), click "Delete entire page" button. That's all!

RefactorMe, please...


see also DELETEME
(do not use the tag, because this page should not be shown in the delete wish list)

How can an administrator delete the trail for a page.
That page should not arrive in the PageIndex, RecentChanges, ...
I can't find the information. Should a restart for the JSPWiki application do it?

All these unused pages mess the PageIndex. If you have this wiki philosophy that content shouldn't get lost, than you can do it like http://www.swiki.net. They don't allow deleting, but you can rename the page and use it otherwise.

Is it easier for deleting pages to use the VersioningFileProvider as the FileSystemProvider?

Nope. With VersioningFileProvider you have to remove the pages from the OLD/ directory as well. I do not have an old directory. Where should it be?

for renaming see: RenamePagePatch


Concerning the deletion of WikiPages, initiated Jan 17, 2003 in Ideas.

soft delete - treating empty pages as deleted#

How about treating empty pages as deleted. This removes the whole problem of losing version information if you really delete the data from the disk.

This needs special handling in a couple of places, but I think it is very intuitive.

--NiiloNeuvo

On the face of it, this sounds like a really good idea. Unfortunately, there are some snags:

  • We need to delete specific page versions anyway... For example, this page alone as 300+ revisions alone, and the old ones are mostly not very interesting.
    • Also, if someone posts illegal material, it must be completely removable.
    • Even though disk space is cheap these days; backup is not.
  • If an empty page is treated as deleted, what happens if someone recreates that page? All of the old content suddenly just appears again?
  • If we allow deleting any revision of a page, then what happens if all revisions of a page are deleted?

It's a bit problematic. I think just deleting the pages is quite a lot simpler... Besides, you do take backups and store them permanently, don't you? :-)

--JanneJalkanen

  1. housecleaning and that is different from deleting files
    1. again housecleaning (you really want to delete the illegal revisions and leave orhers)
    2. housecleaning details
  2. the old content does not reappear, it is the history of the page and it should not vanish
  3. I was not talking about deleting individual revisions.

The idea was, that deletion of a page is a revision just like adding text or removing text. You shouldn't be able to totally delete pages via normal edit interface. Administrative housecleaning should be done locally or via a special UI.

I want to be able to roll back to what ever revision of a page. Even if they have been 'deleted'.

We take backups every night, but pages change more often than that!

--NiiloNeuvo muralikrishna Good point.

As for individual revisions... This is a clear case where Wiki usage for intranet differs from Wiki usage in the public internet. At any rate, we must be able to delete individual revisions, which means that any revision can be deleted. Including the current one. Including all of the previous ones. Which in turn, in practice, deletes the entire page.

For example, in this Wiki, people tend to create all sorts of crappy pages for testing purposes. Those we want to delete, including the entire history. Also, this page has what, 200+ revisions? We don't really need them all...

Perhaps both should be enabled: if you want to remove a page with the history intact, you can just make the page empty (all links will be treated as non-existing, except to links for PageInfo); and real page deletion via an administrator interface.

In any case, I'll do the administrator interface soonish. It'll probably be accessible through PageInfo.

--JanneJalkanen

Remember that you need auth before deploying an admin interface... (Well, ok, you don't, you can just use the container's authentication mechanism, but this was a good opportunity to advertise.;) --ebu

No, not really. I was planning to have the following UI: On the PageInfo view, you have a list of checkmarks, one for each revision. User can choose which versions to delete, then click on "Delete" button. This request is directed to a page called "Delete.jsp", which can be protected using the standard container authentication. Removing all versions equates to removing the whole page.

The upcoming authentication mechanism should be used to selectively remove and display the deletion option, as well as then check for the actual authentication in Delete.jsp.

--JanneJalkanen

About deletion of selected revisions, there's an idea page opened, IdeaDeleteIndividualRevision, to cope with the new ideas tracking mechanism (seems like a better way to track progress and relations to engine versions).


I've been using the code from DiskFile that Thuongnm wrote. The Debug.jsp page is set up to show pages that refer to DELETEME. I can then put their name in the delete box, hit enter. It then shows me the pages that refer to the page I want to delete. If all is good, then I enter the delete password and the page, the history, etc. is gone. Only works with disk file based Wiki, not the CVS or Database provider versions. -- FosterSchucker
Different people mentioned different aims, which cannot be matched with a single solution. Thus I would advocate for a plugin solution, which then may be configured at will. JSPWiki already has such a solution with the FileProvider.
Category Ideas
Ok, so there is a new version out that allows for deleting of pages but for the life of me, I can not figure out how to. Running version 2.30. I can rename pages just fine. But I can not find anywhere to delete them.

Thanks, JPS

It's also on 2.2.27 (which is a lot safer to run). Just click on "More Info..." and you will see "Delete entire page". Click it, and the page shall be deleted. If you have the access rights, that is - by default "Delete.jsp" should be protected in your web.xml.

(If you're not seeing anything, you've forgotten to update your templates/default/PageInfo.jsp, or are running a template that overrides PageInfo.jsp and does not allow deletion.)

-- JanneJalkanen

I thought I did a clean install but for some reason the PageInfo.jsp was an old version. Thanks. JPS

Next Question. When I delete a page that references DELETEME in it, the DELETEME page still says that it is referenced by that page even after it is deleted. I saw there seems to be a fix in the changelog for 2.2.27 and I upgraded just tonight to 2.2.28 just to make sure but the problem still exists.


Here's something interesting:

I used the UnusedPagesPlugin to find old junk. I removed from the file system all the pages returned by the plugin. I removed file.* so that both the .txt and .properties of each page goes away.

Now the index no longer displays those pages. But the UnusedPagesPlugin still shows them, except now they are show as broken links (red and underlined).

How come the index is up-to-date but not the rest of it? Is there a way I can get things back in synch?

Thanks,

Adam

--Adam Ehven, 24-Jun-2006

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-38) was last changed on 19-Mar-2008 17:35 by JanneJalkanen