Page MenuHomePhabricator

archivebot: don't fail if template is under a header?
Open, Needs TriagePublic

Description

I had my archival template configured like this:

= Solicitudes actuales =
{{Usuario:MABot/config
|archiveheader = {{Archivo}}
|minthreadsleft = 0
|minthreadstoarchive = 1
|algo = old(15d)
|archive = Wikilibros:Tablón de anuncios a los bibliotecarios/%(year)d
}}

This setup worked in the past (ref.) however since an undetermined point in the past (that es.wikibooks page doesn't have much traffic so this was the last revision I could find the bot worked fine) archivebot fails with ERROR: Missing or malformed template in page [[es:Wikilibros:Tablón de anuncios a los bibliotecarios]]: Couldn't find the template in the header. This was resolved by removing the header. After that, the bot ran again (although shuffled the template parameters).

Perhaps if the template is found under a level 1 heading the bot shouldn't fail, as it happened in the past?

Event Timeline

Since autumn archivebot looks for the template only in the beginning (above the first heading). As the template is not visible, it can be above the first level heading leaving the heading as is. Since the heading does not contain signature, it won't be archived, so it should be ok this way?

@Dvorapa I tried to make the suggested change but resulted in an unwanted edit: https://an.wikipedia.org/w/index.php?title=Wikipedia:Bots&diff=1630363&oldid=1630361

Note: no cosmetic changes was enabled.

Hm. Weird. Is the change of heading level normal beavior or another bug? I suppose another bug.