Page MenuHomePhabricator

Migrate old Math options to current ones or delete them from the database
Open, Needs TriagePublic

Description

The source of the Math extension currently says:

		// The following deprecated modes have been removed:
		// 'MW_MATH_SIMPLE'      => 1
		// 'MW_MATH_HTML'        => 2
		// 'MW_MATH_MODERN'      => 4
		// 'MW_MATH_MATHJAX'     => 6
		// 'MW_MATH_LATEXML_JAX' => 8

		$defs = [
			'MW_MATH_PNG'    => 0,
			'MW_MATH_SOURCE' => 3,
			'MW_MATH_MATHML' => 5,
			'MW_MATH_LATEXML'=> 7 ];

Still, a lot of user accounts have the deprecated options set. Here's English Wikipedia:

mysql:wikiadmin@db1089 [enwiki]> select up_value, count(up_value) from user_properties where up_property = 'math' and up_value not in ( '0', '3', '5', '7', 'png', 'source', 'mathml' ) group by up_value;
+----------+-----------------+
| up_value | count(up_value) |
+----------+-----------------+
|          |             525 |
| 2        |           13315 |
| 4        |           45067 |
| 6        |            5697 |
| on       |              26 |
+----------+-----------------+
5 rows in set (0.75 sec)

As far as I can tell, preferences can be removed from the Math extension entirely (see T166367), but if that is an exaggeration, then perhaps the old values could be migrated to current ones, or simply deleted from the database.

I guess that 4, 6, and 8 could be deleted from the database, because they are very similar to MathML, which is the default. I don't really remember how do 1 and 2 actually look, but I'd bet on simply deleting them as well. The empty values could probably be deleted, too. I'm not sure what does "on" mean at all.

Additionally, the <chem> and <math chem> tags should also respect the user preferences. It should no longer be a problem to create png images for chem and use the same fall-back options that normal math uses.

Event Timeline

Amire80 created this task.May 26 2017, 8:09 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 26 2017, 8:09 AM
He7d3r added a subscriber: He7d3r.Jan 2 2018, 12:00 PM
Debenben updated the task description. (Show Details)Nov 11 2018, 8:51 PM
Pkra moved this task from Incoming to MW Math Extension on the Math board.Dec 10 2018, 8:38 PM
Aklapper moved this task from MW Math Extension to Incoming on the Math board.Jun 24 2020, 5:28 AM