Description
Using #Deprecated causes the content of the page to render twice!
Using #Deprecated causes the content of the page to render twice!
Your task is to find and fix docs and wiki pages talking about this feature, add clarifications about how it works, close this bug. #Deprecated is a PI (see HelpOnProcessingInstructions).
You will have to do the editing on this wiki and on MoinMaster (see EditingOnMoinMaster).
This task needs about 10h of work and has to be completed within 7 days.
Steps to reproduce
- Create a page with some text
- Save
- Edit again, add #Deprecated at the top
- Save
Example
Details
This wiki
Workaround
Discussion
I fixed this somewhere before 1.3. This seems to me a problem with the changed revisioning system. -- OliverGraf 2004-12-14 08:08:34
Hmmm, anybody noted this is a feature, not a bug? AT least at the time it was implemented... -- JürgenHermann 2005-09-25 17:42:03
Anyway, the way to go here is to exclude #deprecated pages from the search (title search also, if possible at low cost), and just do away with the convoluted don't-save-a-backup code. The original impl sucked big time, if you consider how easy it is to get the desired effect. -- JürgenHermann 2005-09-25 17:59:36
Confirmed as defect for MoinMoin version 1.5.4 [Revision a166ae34993c+ tip] (Python Version 2.4.3 (#3, May 1 2006, 15:34:50) [GCC 3.3.5 (Debian 1:3.3.5-13)]). -- MartinBayer 2006-07-28 16:28:48
- This is not a bug.
- So, why is it a Feature, or at least a Wontfix?
- Jürgen explains his objective above. Possibly this feature is not documented well enough.
I can't find any explanation why this should be considered a feature, and not a bug, only a statement that is was intended to have the contents of a page marked as deprecated displayed twice. As I can't imagine any sensible reason why somebody should wish to have the same thing displayed twice on the same page, I think this is a bug. If you think this is a feature, instead, please explain its advantage to the user.
- It is used to have a very short page like "#deprecated\n\nThis page is deprecated, please go to XYZ.". That was Jürgen's intend according to his own words.
I'm sorry, but I don't see the interrelation between that and the behaviour described in this issue. Even if it were thought as a feature, it would be a mis-designed one, as it breaks the consistence between the page's source code and its rendering in HTML, and, with that, the most basic principle of editing in a wiki. If someone wants to have something twice on a page, she must type it in twice. It something hasn't been typed in twice, the wiki engine must not render it twice. So, this is, by any means, a defect.
- Given the fact that I haven't seen many uses of this feature, changing semantics should not be a big issue.
- It is used to have a very short page like "#deprecated\n\nThis page is deprecated, please go to XYZ.". That was Jürgen's intend according to his own words.
- Jürgen explains his objective above. Possibly this feature is not documented well enough.
- So, why is it a Feature, or at least a Wontfix?
The deprecated feature should be used like this:
- Edit the deprecated page
- Add #deprecated processing instruction at the top
- Delete the deprecated content
- Explain why the page was deprecated and link to page replacing this page
- Save
After saving, the page would show the explanation and the deprecated content from the previous revision. Further editing will not create new revisions.
You can get similar effect without using this feature. Just add similar explanation in the top of the page and link to the replacement page.
One problem with the deprecated feature is changing the content of an older revision. To do that, you have to revert to the older revision, edit it, then deprecate the page again.
I couldn't disagree more. This is just the interference of 2 (severe) bugs, not a feature. It breaks consistence between the page's source code and its rendered output completely: In fact, you see a normal page, but if you click "edit", you don't see anything. It is as if the wiki engine magically created the page's content "ex nihilo". This is unacceptable. A page marked as DEPRECATED shouldn't be editable in the first place. Then, marking a page as DEPRECATED is more or less the same as deleting it (this is why its content should be ignored from any search), with the only difference that users don't have to type in the URL with ?action=recall&, but can still use a normal (wiki-) link to it. Hence DEPRECATED also is not intended in the way you described it: If there is a pages that replaces the deprecated page, just put a link to it in the page or make it a REDIRECT (or just update the page itself in the first place?). This is something different than the delete-but-keep, which I think DEPRECATED is designed for. -- MartinBayer 2007-05-12 21:12:25
About your comments:
- Not consistent - true
A page marked as DEPRECATED shouldn't be editable in the first place - of course it should be. I find it unacceptable if not
Marking a page as DEPRECATED is more or less the same as deleting - no, when you delete a page the name is freed and the content disappear. The purpose of DEPRECATED is to keep the name and content, but warn the reader that this content is DEPRECATED.
this is why its content should be ignored from any search - I don't think it should be ignored from search. It is not consistent and too magical.
If there is a pages that replaces the deprecated page, just put a link to it in the page or make it a REDIRECT - redirect is not a replacement for DEPRECATED because it hides the redirect page.
delete-but-keep - you contradict yourself, either delete or keep
This feature sucks and poorly documented - I understood it only by reading the code but it is not a bug.
Well, doesn't it say somewhere that DEPRECATED pages are excluded from full text search? I thought the concept of DEPRECATED was intended to work in a similar way as the trash bin of your operating system or desktop manager (that is "delete but keep"). Even a normal page deletion doesn't delete the page completely, because older revisions will be kept, and the name isn't freed completely, because you can't rename an other page to a page name that has already been used, but the page itself was deleted. However, I agree that this DEPRECATED feature has a very poor cost-benefit-ratio, I wouldn't care if it was disimplemented. Maybe it would be better to collect the use cases for it and than decide what to do instead of trying to fix it (or to document it or whatever)? -- MartinBayer 2007-05-13 12:04:41
This is not a bug, but a feature. You are not supposed to simply add #deprecated to an existing page, but rather remove the contents of the page, add #deprecated at the top, and then type a short reason explaining the deprecation. (This comment was added by FedLor on 2007-12-24 16:56:53)
We already discussed that above. But even if this feature worked as described on HelpOnProcessingInstructions, we still would have to solve this issue. The wiki engine MUST NOT tamper with the content of a page, which in this case means, it must not double what a user typed in. This was discussed on this page earlier, too. -- MartinBayer 2007-12-25 12:09:23
I understand your point here, and it makes sense. The wiki engine should really not being doing what it is doing. How would modifying the behavior to instead expect #deprecated "<reason>", which will add "<reason>" to the 'The backed up content of this page is deprecated and will not be included in search results!' message that appears at the top of the page sound? This would make the correct use something like this:
#deprecated Password protection is deprecated, use ACLs instead. Password protected pages are really cool!
-- FedLor 2007-12-25 15:07:17
After speaking to ThomasWaldmann on IRC, it seems this method is rather limited. It would only allow single line reasons, with no wiki-markup. The old use however, when used properly, prevents the deprecated content from appearing in search results. Doubling will only appear when you leave the content as is and merely add in a #deprecated, which is NOT what should happen.
MartinBayer->ThomasWaldmann: to refer to the documentation, or implementation details is without any use here.
The parser does not what the user expects from it, because he sees some content on a page that he is unable to find in the page's source. I didn't say that this does not work as designed. But that does not change the fact that the current behaviour is wrong from a users perspective—and thus a bug (call it “broken by design”, if you prefer).
We should therefore first modify the #deprecated parser so that it does not double the pages content any more. That would solve this issue. After that, I suggest to think about the future of #deprecated in a more general way, as I haven't seen really sensible use cases for it till now. 2007-12-26 12:22:03
Now we are talking about usability and a FeatureRequest about better usability of the deprecated processing isntruction. I would prefer to close this bug here and to continue this discussion on a FeatureRequest page. Perhaps we can add a new processing instruction, e.g. "obsolete" in addition so one can choose. So please open a FeatureRequest and add the requirements.
-- ReimarBauer 2007-12-26 16:34:22
Plan
- Priority:
- Assigned to:
- Status: works as documented
See Also