Page MenuHomePhabricator

API query export returns two different XML and sha1 for same revision
Closed, InvalidPublic

Description

How can it be that from this MediaWiki 1.31 wiki I get o2jw5c565achwt31azfnu9zc2zxgqpr (31 characters?) and 5702e4d5fd9173246331a889294caf01a3ad3706 for the same revision?
https://gobblerpedia.org/w/api.php?action=query&titles=Main%20Page&export=1&format=xml

I don't see the same in https://gobblerpedia.org/w/api.php?action=query&list=allrevisions&arvlimit=10&arvnamespace=0&arvprop=ids|timestamp|user|userid|size|sha1|contentmodel|comment|content

Also attached at F31606900 F31606901 F31606902

  <page>
    <title>Main Page</title>
    <ns>0</ns>
    <id>1</id>
    <redirect title="Main page" />
    <revision>
      <id>3677</id>
      <parentid>1</parentid>
      <timestamp>2018-12-19T22:15:31Z</timestamp>
      <contributor>
        <username>Wiki-admin</username>
        <id>45</id>
      </contributor>
      <comment>Redirected page to [[Main page]]</comment>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text xml:space="preserve" bytes="23">#REDIRECT [[Main_page]]</text>
      <sha1>o2jw5c565achwt31azfnu9zc2zxgqpr</sha1>
    </revision>
  </page>
<page>
  <title>Main Page</title>
  <ns>0</ns>
  <id>1</id>
  <revision>
    <id>3677</id>
    <parentid>1</parentid>
    <timestamp>2018-12-19T22:15:31Z</timestamp>
    <contributor>
      <id>45</id>
      <username>Wiki-admin</username>
    </contributor>
    <comment>Redirected page to [[Main page]]</comment>
    <text bytes="23" space="preserve">#REDIRECT [[Main_page]]</text>
    <model>wikitext</model>
    <sha1>ce111c28c158bacd1ad89fbacb33e48d0e2e383f</sha1>
  </revision>
  <revision>
    <id>1</id>
    <parentid>0</parentid>
    <timestamp>2018-12-13T21:14:03Z</timestamp>
    <contributor>
      <id>0</id>
      <username>MediaWiki default</username>
    </contributor>
    <comment></comment>
    <text bytes="735" space="preserve">&lt;strong&gt;MediaWiki has been installed.&lt;/strong&gt;

Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] for information on using the wiki software.

== Getting started ==
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]</text>
    <model>wikitext</model>
    <sha1>5702e4d5fd9173246331a889294caf01a3ad3706</sha1>
  </revision>
</page>

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Anomie subscribed.

How can it be that from this MediaWiki 1.31 wiki I get o2jw5c565achwt31azfnu9zc2zxgqpr (31 characters?) and 5702e4d5fd9173246331a889294caf01a3ad3706 for the same revision?

You're not. The 5702e4d5fd9173246331a889294caf01a3ad3706 belongs to a revision with ID 1, while the o2jw5c565achwt31azfnu9zc2zxgqpr belongs to a revision with ID 3677.

But you are seeing (somewhere, it's not clear where) both o2jw5c565achwt31azfnu9zc2zxgqpr and ce111c28c158bacd1ad89fbacb33e48d0e2e383f for revision 3677. These are the same hash in different representations: the former is using base-36 while the latter is using base-16.