https://bugzilla.wikimedia.org/show_bug.cgi?id=18274


[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://transgender-         |
                   |taiwan.org/index.php?title=�|
                   |��絡                       |
           Priority|Normal                      |High
            Summary|{{SERVER}}/ renders as      |Parser Cache's {{SERVER}}
                   |localhost, but only when /  |becomes "localhost" with
                   |is appened                  |maintenance scripts




--- Comment #1 from [email protected]  2009-03-31 14:02:19 UTC ---
OK: I have found the problem:

If one uses
importDump.php or importTextFile.php,
{{SERVER}} will be rendered as http://localhost/
until one does
echo "TRUNCATE objectcache;"|mysql MyDatabase

Special:Import and editing by hand are not affected.

Proof:
$ echo {{SERVER}} > TestOne; php importTextFile.php TestOne
This will render as
http://localhost/

Now visit title=TestTwo&action=edit, placing the words {{SERVER}} in
it and hitting save.

Notice how TestTwo renders fine. No spurious "localhost". Instead the
true hostname.

So how can we fix TestOne?
$ echo "TRUNCATE objectcache;"|mysql MyDatabase
OK, now our wiki is once more presentable to the public. (Which I have done, so
run the test on your own wiki, as I have now fixed mine.)

You might say "well, then just edit everything by hand". Try importing
15 pages by hand.

Debugging the problem, we see the date
<!-- Saved in parser cache with key transgender:pcache:idhash:12-0!1!0!!zh-tw!2
and timestamp 20090331072334 -->
is the moment we imported the file.

I put a debug statement here, which produced the following.

--- includes/BagOStuff.php      (revision 49060)
+++ includes/BagOStuff.php      (working copy)
@@ -423,6 +423,7 @@
                        }
                }
                $ret = unserialize( $serial );
+               echo '<pre>',var_dump($ret),'</pre>';
                return $ret;
        }
 }

which produced:

  ["mCacheTime"]=>
  string(14) "20090331072334"
  ["mVersion"]=>
  string(5) "1.6.4"
  ["mLinks"]=>
  array(2) {
    [0]=>
    array(1) {
      ["專線"]=>
      string(2) "20"
    }
    [2]=>
    array(1) {
      ["WikiSysop"]=>
      string(1) "7"
    }
  }
  ["mTemplates"]=>
  array(0) {
  }
  ["mTemplateIds"]=>
  array(0) {
  }
  ["mImages"]=>
  array(0) {
  }
  ["mExternalLinks"]=>
  array(4) {
    ["mailto:[email protected]"]=>
    int(1)
    ["mailto:[email protected]"]=>
    int(1)
    ["http://zh.wikipedia.org/"]=>
    int(1)
    ["http://localhost/"]=>
    int(1)
  }
  ["mNewSection"]=>
  bool(false)
  ["mHideNewSection"]=>
  bool(false)
  ["mNoGallery"]=>
  bool(false)
  ["mHeadItems"]=>
  array(0) {
  }
  ["mOutputHooks"]=>
  array(0) {
  }
  ["mWarnings"]=>
  array(0) {
  }
  ["mSections"]=>
  array(0) {
  }
  ["mProperties"]=>
  array(0) {
  }
  ["mIndexPolicy:private"]=>
  string(0) ""
  ["displayTitle:private"]=>
  bool(false)
  ["mTimestamp"]=>
  string(14) "20090323222425"
}


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to