Jump to content

Topic on Extension talk:AbuseFilter/Rules format/Archive 2

Identifying new pages

5
Erutuon (talkcontribs)

I have a question about statements in the documentation about identifying new pages. I am an admin in the English Wiktionary. In the documentation for page_id and page_age, it seems to say that for new pages page_id may be 0 and page_age is always 0, but there were no matches for either condition (page_id == 0 or page_age == 0) in Special:AbuseFilter/test except for page deletions, whereas old_size == 0 yields a lot of edits that created pages (for which neither page_id nor page_age were equal to 0). Is the documentation wrong that page_id == 0 and page_age == 0 identify newly created pages or am I misinterpreting what it says somehow?

Ciencia Al Poder (talkcontribs)

page_id is a non-deterministic value that changes when the page is created. The filters are checked before the new page is assigned a new ID, hence the filter matches when the page is evaluated at the time of creation, but not when the page has already been created, because then the page already has an ID.

Erutuon (talkcontribs)

So basically the page creation actions seen in Special:AbuseFilter/test do not contain the actual value of page_id when the action occurred, the value that a filter will see when it is saved and in operation? And the same with page_age? That is not helpful because it does not allow Special:AbuseFilter/test to give a completely realistic picture of how a filter will work, as far as page_id is concerned. I would have expected to be searching a "snapshot" of the actual values when the action happened. But I suppose the workaround is to create a test filter.

Ciencia Al Poder (talkcontribs)

Yeah, that data is not saved. Probably because that would be a lot of information to store for each edit/action that doesn't match any filter. This is task T102944

Erutuon (talkcontribs)

Thanks for explaining this to me, and for posting about this on the Phabricator task.

Reply to "Identifying new pages"