Page MenuHomePhabricator

enable variable old_html and old_text
Closed, DeclinedPublic

Subscribers
Tokens
"Orange Medal" token, awarded by Liuxinyu970226."Cookie" token, awarded by whym."Orange Medal" token, awarded by Dalba.
Assigned To
None
Authored By
Nemo_bis, Jan 10 2010

Description

It would be useful to be able to use the variable old_html in AbuseFilter on Wikimedia wikis (specifically, it.wikiquote): old_html is currently calculated (see e.g. [[Special:AbuseFilter/examine/log/1864098]]), but if you try to use it in a filter you get the error: «Syntax error detected: Unrecognised variable old_html».
I suppose this is a wanted behaviour to reduce resources consumption, but I file this bug as a placeholder/reminder.

Details

Reference
bz22075

Event Timeline

bzimport raised the priority of this task from to Low.
bzimport set Reference to bz22075.
bzimport added a subscriber: Unknown Object (MLST).
Nemo_bis created this task.Jan 10 2010, 8:11 PM
  • Bug 24310 has been marked as a duplicate of this bug. ***
  • Bug 23027 has been marked as a duplicate of this bug. ***

Looking at AbuseFilter.class.php, those two variables are commented out with the note "Disabled, performance".

We could add a new preference option ($wgAbuseFilterOldVariables) which could be used to then enable them on a per-wiki basis?

I'll look to see if I can find any discussion on why they were disabled.

Dalba added a subscriber: Dalba.Jun 10 2015, 11:52 AM

It requires reparsing the old text, which in some cases can take tens of seconds. Of course, the old text has already been parsed at some point, but some engineering is needed to actually retrieve this parsed HTML from the appropriate cache.

Krinkle updated the task description. (Show Details)Jun 11 2015, 6:25 AM
Krinkle removed a project: Performance.
Krinkle set Security to None.
whym awarded a token.Jun 4 2017, 11:23 AM
Huji closed this task as Declined.Mar 17 2018, 12:03 AM
Huji added a subscriber: Huji.

It would require parsing the old text, which would be slow, therefore it is going to severely impact efficiency of filters. Harms outweigh benefits.

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptMar 17 2018, 12:03 AM

It would require parsing the old text, which would be slow

The HTML of the "old" text is in fact the current HTML when the filters are run, isn't it?

Slowness can be excessive in general but there are cases where this should be possible to configure. For instance, isn't RESTBase supposed to provide cached HTML for revisions on Wikimedia wikis? If the solution were to be very special-based I can understand it would be very low priority.