Last modified: 2013-02-21 18:29:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T44616, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42616 - Post-page move redirects contain two newlines below redirect code
Post-page move redirects contain two newlines below redirect code
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Redirects (Other open bugs)
1.21.x
All All
: High normal (vote)
: ---
Assigned To: Ori Livneh
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-02 05:23 UTC by Myeongjin
Modified: 2013-02-21 18:29 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Myeongjin 2012-12-02 05:23:30 UTC
If move page, page which made redirect is 2 newlines.

aka Page "PSY (rapper)" to "PSY (entertainer), page made redirect is:

"#REDIRECT [[PSY (entertainer)]]

"

----

"#REDIRECT [[PSY (entertainer)]]
  <- 2 newlines
"
Comment 1 Andre Klapper 2012-12-03 12:00:03 UTC
By "2 newlines" did you mean 2 whitespaces in one line? 
I do not see two new lines there... :)

Which exact wiki is this about? English Wikipedia?
Comment 2 MZMcBride 2012-12-04 03:55:11 UTC
I've confirmed this bug. It's kind of nasty, as any subsequent save of the page will lead to diffs such as this: <https://test.wikipedia.org/w/index.php?title=Some_page_title&diff=prev&oldid=152897> (MediaWiki typically strips trailing newlines in the edit area).

When a page is moved using Special:MovePage, the resulting redirects looks as described above:

"#REDIRECT [[Possible bug below redirect code]]

"

This is "#REDIRECT [[Possible bug below redirect code]]\n\n" when it should be "#REDIRECT [[Possible bug below redirect code]]\n".

Somehow the move page form is bypassing MediaWiki's usual rule of not allowing trailing newlines. Bumping the priority of this, as it's kind of corrupting any redirect that's created as the result of a page move (probably thousands of redirects by now).
Comment 3 Ori Livneh 2012-12-04 04:55:21 UTC
Gerrit change #36705
Comment 4 MZMcBride 2012-12-13 16:45:51 UTC
(In reply to comment #3)
> Gerrit change #36705

Daniel Kinzler merged this on December 12. I suppose this bug can now be marked as resolved/fixed.
Comment 5 MZMcBride 2012-12-16 12:11:56 UTC
(In reply to comment #2)
> I've confirmed this bug. It's kind of nasty, as any subsequent save of the
> page will lead to diffs such as this:
> <https://test.wikipedia.org/w/index.php?title=Some_page_title&diff=prev&oldid=152897>
> (MediaWiki typically strips trailing newlines in the edit area).

I filed a separate bug for the diff issue: bug 42669.

It seems from testing on the English Wikipedia that while a large number of these redirects containing trailing newlines came from this recent ContentHandler bug (solved by Gerrit change #36705), there have been older bugs in the code that have caused similarly goofy redirects. I'm seeing some from 2005 and some from 2002 (related to the Conversion script, perhaps).

I'm also noticing byte count irregularities. I believe the maintenance script that populated byte counts for each revision miscalculated in some cases. This probably needs further investigation, as it may have ripple effects on data integrity checks, particularly the SHA1 hashes.
Comment 6 MZMcBride 2012-12-17 20:09:18 UTC
I've noticed a few other anomalies as well. The following three redirects have positive values for their byte counts:

* https://en.wikipedia.org/w/index.php?title=G.U._Pope&action=history
* https://en.wikipedia.org/w/index.php?title=Peter_F._Allgeier&action=history
* https://en.wikipedia.org/w/index.php?title=Astropetrology&action=history

The following three redirects had "subst:" code that was submitted without proper expansion:

* https://en.wikipedia.org/w/index.php?title=Mounted_skill_at_arms&action=history
* https://en.wikipedia.org/w/index.php?title=Mounted_skill-at-arms&action=history
* https://en.wikipedia.org/w/index.php?title=Equestrian_skill_at_arms&action=history

And this redirect apparently had been changed to the text "test", but the database was seemingly never aware of this:

* https://en.wikipedia.org/w/index.php?title=Biopolitical&action=history
Comment 7 MZMcBride 2012-12-18 04:58:48 UTC
Just pasting this here so I don't lose it later:

mysql> select rc_title, rc_old_len-rc_new_len as diff from recentchanges where rc_user_text = 'MZMcBride' and rc_comment = '[[bugzilla:42616]]' and rc_old_len-rc_new_len not in (1,2,3) order by rc_timestamp desc limit 100;
+--------------------------+------+
| rc_title                 | diff |
+--------------------------+------+
| Biopolitical             |   21 |
| Mounted_skill-at-arms    | -564 |
| Mounted_skill_at_arms    | -564 |
| Equestrian_skill_at_arms | -564 |
| Taimur_bin_Faisal        |    0 |
| G.U._Pope                |   -1 |
| Cross_examination        |    0 |
| Useless_languages        |    4 |
| Great_Lake               |    6 |
| Norrie-Warburg_syndrome  |    0 |
| Peter_F._Allgeier        |   -3 |
| Astropetrology           |   -2 |
| DSM-III                  |    4 |
| TinaArena                |    4 |
| Langobardi               |    6 |
| Anselm_of_Bec            |    9 |
| Ben_Stiller_Show         |    4 |
| Saint_Adalbert_of_Prague |    4 |
| Imaginary_numbers        |    6 |
+--------------------------+------+
19 rows in set (8.37 sec)
Comment 8 MZMcBride 2012-12-22 04:26:56 UTC
mysql> select rc_title, rc_old_len-rc_new_len as diff from recentchanges where rc_user_text = 'MZMcBride' and rc_comment = '[[bugzilla:42616]]' and rc_old_len-rc_new_len not in (1,2,3) order by rc_timestamp desc limit 100;
+-----------------------------------------+--------+
| rc_title                                | diff   |
+-----------------------------------------+--------+
| Handley-Page_Halifax                    |      0 |
| Jackie_Joyner-Kersey                    |   -417 |
| 1_John                                  |      6 |
| 2_Peter                                 |      4 |
| Serotonin-specific_reuptake_inhibitors  |      4 |
| Victoria_park_hong_kong                 |     11 |
| Eight_Painters_of_Nanjing               |     -1 |
| Republican_Party_of_Hawaii              |     38 |
| Photo_electric_effect                   |      4 |
| GC&SU                                   |     19 |
| U.S._Northern_Command                   |      9 |
| Vnr                                     |      0 |
| French_Guinea/Economy                   |      6 |
| Matt_Le_Blanc                           |   -135 |
| Uralskiy_Khrebet                        |      4 |
| Nawaf_Al_Hazmi                          |      4 |
| ManiacMansion                           |      4 |
| AlexanderDugin                          |     -1 |
| Telematic                               |  -2114 |
| Noronic                                 |     24 |
| TotalOrderedSet                         |      4 |
| SetTopBox                               |      4 |
| LieGroup                                |      6 |
| Fundamtenal                             |      4 |
| Piemonte                                |      4 |
| Verlan_language                         |      6 |
| Newspeak_language                       |      4 |
| Canis_latrans                           |      6 |
| Hippy                                   |      4 |
| Lycopersicum_lycopersicum               |      4 |
| Loglan_language                         |      4 |
| Lojban_language                         |      4 |
| Oxidized_assault                        |  -1150 |
| Electronic_configuration                |      4 |
| 1_Peter                                 |      4 |
| Gaseous_phase                           |      4 |
| Gaseous_state                           |      4 |
| D-Von_Dudley                            |      4 |
| Dead_or_Alive:_Extreme_Beach_Volleyball |      0 |
| Julianna_Mauriello                      |      5 |
| Suprasegmental_feature                  |     31 |
| Cosmothiesm                             | -10191 |
| Quantuum_chemistry                      |      4 |
| Mononoke_Hime                           |      4 |
| Mood_stabilisers                        |      6 |
| JapaneseLanguage                        |      4 |
| Sahara_(movie)                          |      4 |
| Sample_(music)                          |     29 |
| Richard_Matthew_Stallman                |      0 |
| R.A.Wilson                              |      4 |
| Ubbi_dubbi_language                     |      6 |
| Tom_Paine                               |      4 |
| Niedersachsen                           |      4 |
| Koenigsberger_klopse                    |      0 |
| Brooklyn_Trolley_Museum                 |      4 |
| Westminster_chime                       |      0 |
| Olmsted_Falls                           |     -1 |
| PLAUTIA_URGANILLA                       |     -2 |
| Dermabond                               |      4 |
| SherlockHolmes                          |      4 |
| City_of_New_York                        |     23 |
| Jean_Gray                               |      4 |
| Bunnyhopping                            |     -9 |
| University_of_Algarve                   |      0 |
| Cuon_alpinus                            |      4 |
| Ludwig_von_Koechel                      |     -4 |
| Christian_escathology                   |      4 |
| National_Wrestling_Alliance_UK          |      4 |
| Rhincodon_typus                         |      0 |
| Paul_W._Bryant                          |     10 |
| Biopolitical                            |     21 |
| Mounted_skill-at-arms                   |   -564 |
| Mounted_skill_at_arms                   |   -564 |
| Equestrian_skill_at_arms                |   -564 |
| Taimur_bin_Faisal                       |      0 |
| G.U._Pope                               |     -1 |
| Cross_examination                       |      0 |
| Useless_languages                       |      4 |
| Great_Lake                              |      6 |
| Peter_F._Allgeier                       |     -3 |
| DSM-III                                 |      4 |
| TinaArena                               |      4 |
| Langobardi                              |      6 |
| Anselm_of_Bec                           |      9 |
| Ben_Stiller_Show                        |      4 |
| Saint_Adalbert_of_Prague                |      4 |
| Imaginary_numbers                       |      6 |
+-----------------------------------------+--------+
87 rows in set (42.77 sec)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links