Short description

I think it would be nice to have two MissingPage pages, served as the content of nonexisting page depending whether the user has the right to create them or not.

This would be useful for all the Wikis that disallow writing by anonymous users.

I've often seen user confused by the "Create page" link and the templates list. Once they click it and see the "you cannot edit this page" message, they usually don't know how to go back, and then panic and close the browser window...

On the other hand, if there was a second MissingPage page, for example MissingPageReadOnly, then you could remove the "create" link and the templates list from it, and put a nice and friendly explanation that you have to log in (with a link to login page) to create or edit pages. And a list LikePages of course.

Patch

All you have to do is modify your Page.py:

   1     def _emptyPageText(self, request):
   2         """
   3         Output the default page content for new pages.
   4 
   5         @param request: the request object
   6         """
   7         if request.user.may.write(request.page.page_name):
   8             missingpage = wikiutil.getSysPage(request, 'MissingPage')
   9         else:
  10             missingpage = wikiutil.getSysPage(request, 'MissingPageReadOnly')
  11         missingpagefn = missingpage._text_filename()
  12         missingpage.page_name = self.page_name
  13         missingpage._text_filename_force = missingpagefn
  14         missingpage.send_page(request, content_only=1, send_missing_page=1)

IMHO this should be done with a conditional include on MissingPage, not with more python special-case code. Not that a conditional include macro exists that can take advantage of may.read or whatever, but it'd be the way to solve this I think. -- JohannesBerg 2006-07-24 12:27:23


CategoryFeatureRejected CategoryMoinMoinPatch

MoinMoin: FeatureRequests/AlternateMissingPage (last edited 2011-05-17 15:38:51 by RogerHaase)