Description
If you create a new page with the help of the NewPage-macro, moin displays the "wrong" page: it displays the page the macro is from. Better: You would expect that the newly generated page ist shown.
Steps to reproduce
- start with this bug report page
use the [[NewPage(HomepageTemplate)]] maco (see below) for creating a new page
- fill in the form, submit button
NOW:
commit the edits, i.e. do create the new page
BUG: Moin displays this BugReport again instead of the newly generated page
OR
do not commit the edits, i.e. abort editing
- CORRECT behaviuor of the wiki: you get to an empty page which you may create now or later if you like.
Example
you have to create a new page to reproduce the bug:
Details
this wiki (moin 1.5.2) Tested within the WikiSandBox 5 minutes ago.
Workaround
I patched this in my wiki by changing action/newpage.py around line 83 to remove 'backto': self.referer from the assignment to query.
Now, if you save, you stay on the new page; if you cancel, you get the "No such page, create one if you want" page.
-- DavidSinger 2006-09-22 16:55:04
Discussion
True, the backto is annoying most of the time. I don't know why we used it.
I believe the answer to that question is found on VitoMiliano/CreatingNewPagesEasily... (plagiarism follows):
If you change your mind and hit "Cancel," you're taken to the regular MissingPage.
If you don't have ACL permissions that allow you to make a new page (e.g. a read-only wiki) you're also taken to the regular MissingPage.
- So it appears to be a tradeoff, as things stand?
Yes, it does makes sense in you cancel or page creation fails. So the complete fix should be:
- If the page was created, show the new page
- If the page was not created, go back to the "backto" page.
Plan
- Priority:
- Assigned to:
Status: fixed in http://hg.moinmo.in/moin/1.7/rev/db48ab0b2bf8