User:Valhallasw

From KDE TechBase
Revision as of 16:15, 25 August 2013 by Valhallasw (talk | contribs) (Created page with "== Fixing encoding problems == Issue: two pages with the same name, but in different encodings: <pre> <p pageid="6713" ns="0" title="Localization/fy/Fryske kompjûterwu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Fixing encoding problems

Issue: two pages with the same name, but in different encodings:

      <p pageid="6713" ns="0" title="Localization/fy/Fryske kompjûterwurden" />
      <p pageid="16282" ns="0" title="Localization/fy/Fryske kompj�terwurden" />

1) Check contents of page

  1. Get the page ids: 6713 and 16282 in this case
  2. Go to http://techbase.kde.org/index.php?curid=6713&redirect=no / http://techbase.kde.org/index.php?curid=16282&redirect=no and check which one has relevant content.

2) Moving

If the wrong page has content, you'll have to move the page. It's not clear to me whether this is possible from the GUI, though. From the API, this is what you do:

  1. GET http://techbase.kde.org/api.php?action=tokens&type=move
  2. POST http://techbase.kde.org/api.php with POST content:
{
    "reason": [
        "Fix latin-1/utf-8 encoding mess by reverting the move from 2010"
    ],
    "fromid": [
        "6713"
    ],
    "action": [
        "move"
    ],
    "token": [
        "(the token)"
    ],
    "to": [
        "Localization/fy/Fryske_kompj\u00fbterwurden"
    ]
}

This will move inaccessible page over to the accessible location.

3) deleting

Using the web interface results in deleting the wrong page, so this also has to happen via the API. This should work (untested):

  1. GET http://techbase.kde.org/api.php?action=tokens&type=delete
  2. POST http://techbase.kde.org/api.php with POST content:
{
    "reason": [
        "Fix latin-1/utf-8 encoding mess by reverting the move from 2010"
    ],
    "pageid": [
        "16282"
    ],
    "action": [
        "delete"
    ],
    "token": [
        "(the token)"
    ],
}