Add null revisions for page delete and restore events. In the case of a page deletion event, the null revision would be stored as a new archive table row.
Version: 1.24rc
Severity: enhancement
See also:
Add null revisions for page delete and restore events. In the case of a page deletion event, the null revision would be stored as a new archive table row.
Version: 1.24rc
Severity: enhancement
See also:
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | Feature | None | T72239 Generate entries for deletions and restores in page histories | ||
Open | None | T211504 Ignore null revisions when checking if a non-admin can overwrite a redirect | |||
Duplicate | None | T211505 Do not show a rollback link if all the affected edits are null revisions | |||
Open | None | T211506 Thanking for a null revision should cause the same message as thanking for the log entry. | |||
Duplicate | None | T194259 Rollback should ignore null edits |
(In reply to Jesús Martínez Novo (Ciencia Al Poder) from comment #1)
Could you explain what problem are you trying to solve, or why would it be
useful?
Then the page history (index.php?action=history) can display the deletion and restoration log events. That seems like a pretty important part of the history of what's been happening with the page, much like imports. [[mw:Manual:Null revision]]
gerritadmin wrote:
Change 157636 had a related patch set uploaded by leucosticte:
Save a null revision in page history notifying of deletion/undeletion When a page is deleted or undeleted, save a null revision in the page history.
History splits/merges/etc. are already really messy as it is, and this would make them even worse for virtually no gain. There's no good reason to duplicate this information that's already in the logs.
(In reply to Jackmcbarn from comment #4)
History splits/merges/etc. are already really messy as it is, and this would
make them even worse for virtually no gain. There's no good reason to
duplicate this information that's already in the logs.
I wonder if there are some other log events that don't need to have null revisions either? Like page protection events?
(In reply to Jackmcbarn from comment #4)
History splits/merges/etc. are already really messy as it is, and this would
make them even worse for virtually no gain. There's no good reason to
duplicate this information that's already in the logs.
?action=history (that is, the page's history) probably should include matching items from Special:Log. The fact that page protections and page moves leave a visible entry and administrative actions such as page deletion and page restoration do not leave an entry in the page history is strange and unexpected, I think. We're logging this information, why oddly segregate it? It should be integrated. There's some parity with Special:Contributions and Special:Log (cf. bug 3716).
There's a real design issue here: in the GUI, we're currently poorly exposing what should be internal implementation details. Yes, there's a revision table and a logging table, but only people working on MediaWiki need to care about this. There are a few different approaches we can take to address this issue. This bug report is probably a duplicate of bug 4172.
(In reply to MZMcBride from comment #6)
need to care about this. There are a few different approaches we can take to
address this issue. This bug report is probably a duplicate of bug 4172.
What approaches did you have in mind?
(In reply to Nathan Larson from comment #7)
(In reply to MZMcBride from comment #6)
need to care about this. There are a few different approaches we can take to
address this issue. This bug report is probably a duplicate of bug 4172.What approaches did you have in mind?
Figuring out a way to fold Special:Log entries into ?action=history and Special:Contributions is one approach.
Another approach would be adding null revisions when deleting or undeleting. But I'm not a huge fan of this idea, as it feels messy. Even the null revisions being inserted for page protection and page moves feel kind of hackish to me.
Don't null revisions also have the drawback that changing the visibility of a log event doesn't automatically change the visibility of the null revision?
(In reply to Nathan Larson from comment #9)
Don't null revisions also have the drawback that changing the visibility of
a log event doesn't automatically change the visibility of the null revision?
Yes.
(In reply to Jesús Martínez Novo (Ciencia Al Poder) from comment #1)
Could you explain what problem are you trying to solve, or why would it be
useful?Then the page history (index.php?action=history) can display the deletion
and restoration log events. That seems like a pretty important part of the
history of what's been happening with the page, much like imports.
[[mw:Manual:Null revision]]
"Add null revisions for page delete and restore events" This is an implementation design/decision, not a valid issue. Please see the summary description in the "how to report a bug" guide [1]. Changing accordingly.
The problem with this patch is that it will "fix" it for new deletions and restores, but old actions won't have that null revision.
(In reply to MZMcBride from comment #6)
The fact that page protections and page
moves leave a visible entry and administrative actions such as page deletion
and page restoration do not leave an entry in the page history is strange
and unexpected, I think. We're logging this information, why oddly segregate
it? It should be integrated.
Yes, that's not very consistent. But when you delete the whole page, you delete the entire history, so there's no point in having an entry in the history about that unless you restore the page again.
(In reply to MZMcBride from comment #6)
There's a real design issue here: in the GUI, we're currently poorly
exposing what should be internal implementation details. Yes, there's a
revision table and a logging table, but only people working on MediaWiki
need to care about this. There are a few different approaches we can take to
address this issue. This bug report is probably a duplicate of bug 4172.
Agreed. Although page moves can mess the things. Imagine you have a lot of logs in page A, you then move page A to B (without leaving a redirect), and then move page C to A. With the current logging system, if this approach would be implemented, the page history of A would have the history of the old page C mixed with logs of the new page B.
[1] https://www.mediawiki.org/wiki/How_to_report_a_bug(In reply to Nathan Larson from comment #2)
If the inconsistency is a problem, I'd much rather see it fixed by removing the null revisions from the things that cause them now, rather than by adding them in even more places.
Please see https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(proposals)&oldid=871029729#Diffs_should_include_log_extracts for a current discussion about this.
There is a related discussion at https://wm-bot.wmflabs.org/logs/%23wikimedia-tech/20181128.txt
Most of that IRC log seems to contain arguments that are invalid when implementing this as a null edit rather than doing extra database queries whenever viewing the revison history. The first real point appears at 16:57:22. In my personal opinion, it should not matter how a ticket is written; the existence of a feature request implies that there is use for the feature, and the feature has no downsides, so it should be implemented. This is open since 2014, and people are now wondering (see Village Pump link above) why this is still not a thing.
The idea of generating null revisions on deletions and undeletions has some disadvantages:
Thanks.
I'm on mobile and it's late. I guess the best approach is to create new issue reports for points 2-5, which are valid suggestions independently of this issue here. I may do so tomorrow.
Another disadvantage I forgot to list above is that if one first restores only the first n deleted revisions, and then restores the later revisions after, one would have to revert the page to how it was before it was deleted. Of course, a similar problem would also occur when one erases the last n revisions' metadata from an XML file prior to importing, and then importing only the later revisions after undoing the erasure of the last n revisions from the XML file and erasing the earlier revisions instead, but usually we leave the XML file alone and import all of the revisions in one step. In fact, we should never generate a null revision when deleting a page, because it is pointless and if one were to be generated, it would always be based on the latest deleted revision (ar_parent_id), yet we allow partial undeletions that restore only the first n revisions. Also, we should generate a null revision on undeletion only when restoring deleted revisions for an existing page.
Advantages of this restriction:
@Ammarpad - you've merged my task T62736 (created 6 months before this one in 2014) here as a duplicate. But I share the many concerns expressed by commenters above about the hacky nature of using null revisions. My task imagined using database queries to provide an integrated view of history and deletion events, and as such I don't think it's a duplicate of this at all.
I misread the dates. I read the bzimport importation date (which appears below the graph card) and assumed they were created the same day.
That said, I believe these tasks are essentially the same. You're very free to unmerge them if you or anyone disagree though.