Page MenuHomePhabricator

Provide an option to prevent archiving if the archive page to be created would have no incoming link from the original page
Open, Needs TriagePublic

Description

This task is based on @Elvey's comment: https://meta.wikimedia.org/w/index.php?diff=15978644&oldid=15801003

Several points to consider:

  • Should orphaned archive pages never be created or does it depend on different communities? I personally tend to think an optional command-line option for it would suffice.
  • For cleaner edit histories, how can we make it preventive rather than self-reverting own edits? Templates like {{Archive box}} generate links dynamically, making it difficult to check the existence of such links without having to actually save the changes.
  • Elvey suggested the bot should add the archive box template, but I deliberately excluded it from this task in an effort to make it lead to a language/wiki agnostic solution. (English Wikipedia and Meta might have {{archive box auto}}, but what about other wikis?) That feature might have its own merit, but I'd prefer to discuss it separately.

Event Timeline

whym created this task.Oct 13 2016, 9:25 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptOct 13 2016, 9:25 AM
whym renamed this task from archivebot should not archive if the archive page to be created would have no incoming link from the original page to Provide an option to prevent archiving if the archive page to be created would have no incoming link from the original page.Oct 13 2016, 9:26 AM
Elvey added a comment.EditedOct 26 2016, 8:23 PM

Thanks for creating this.
Thinking about strategies.
Assertions:
Every language/wiki should have an archive box template.
One more variable pointing to a language-specific template ({{archive box auto}} for each language) is trivial compared to the alternative of not having this feature and maintaining links to archives manually. (And perhaps the variable already exists?)
I can't think of a case where we would want to allow auto archiving if the archive page to be created would have no incoming link from the original page. So I think having an option/setting is inappropriate.

Propose logic (sorry - not python!):
When archivebot active:

if the archive page to be created would have no incoming link from the original page
  if the variable pointing to a language-specific template is set for this language
    Add the template and perform archiving.
  else
    do neither
else 
  perform archiving

Make sense? I think the title should be changed back or changed again.

whym added a comment.Oct 29 2016, 10:48 AM

Elvey, can we discuss that in T149476?

I thought that placing a navigation template would be rather difficult from an implementation perspective. So I tried to more or less achieve the purpose ('ensure no "bad" archiving happen') in a simpler way that doesn't have to rely on another set of wiki-specific templates. I think I might have started this task in a confusing way - apologies for that.

whym added a comment.Oct 29 2016, 10:54 AM

I can't think of a case where we would want to allow auto archiving if the archive page to be created would have no incoming link from the original page.

Some wikis might have other means to add links to subpages dynamically. I can think of an automatically-loaded site JavaScript (written in [[MediaWiki:Common.js]]) to show a list of the current page's subpages into the sidebar. In such cases, the lack of static wiki-links might not be an issue. Note also that this bot is intended to be used on non-Wikimedia wikis as well. This is why I think it is preferable to make the feature optional.

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptSat, Mar 23, 10:14 PM