How to silence mediawiki warning "You have followed a link to a page that does not exist yet" when creating a page with visual editor: Difference between revisions

From razwiki
Jump to navigation Jump to search
(Created page with "https://wiki.abuissa.net/api.php?action=visualeditor&format=json&paction=parse&page=Rerere&uselang=en&formatversion=2 has the response: <pre> { "visualeditor": { "resul...")
 
No edit summary
Line 35: Line 35:


The relevant code is here: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/VisualEditor/+/refs/heads/master/includes/ApiVisualEditor.php#334
The relevant code is here: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/VisualEditor/+/refs/heads/master/includes/ApiVisualEditor.php#334

And editing the file worked, no reload necessary: root@localhost:/var/lib/mediawiki/extensions/VisualEditor# vi includes/ApiVisualEditor.php

Next steps: [[track mediawiki configuration in git]] to make it all come together.

Revision as of 01:51, 5 December 2021

https://wiki.abuissa.net/api.php?action=visualeditor&format=json&paction=parse&page=Rerere&uselang=en&formatversion=2 has the response:

{
  "visualeditor": {
    "result": "success",
    "notices": [
      "<p>You have followed a link to a page that does not exist yet.\nTo create the page, start typing in the box below (see the <a class=\"external text\" href=\"https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents\">help page</a> for more info).\nIf you are here by mistake, click your browser's <strong>back</strong> button.\n</p>"
    ],
    "checkboxesDef": {
      "wpWatchthis": {
        "id": "wpWatchthis",
        "label-message": "watchthis",
        "tooltip": "watch",
        "label-id": "mw-editpage-watch",
        "legacy-name": "watch",
        "default": true
      }
    },
    "checkboxesMessages": {
      "accesskey-watch": "w",
      "tooltip-watch": "Add this page to your watchlist",
      "watchthis": "Watch this page"
    },
    "protectedClasses": "",
    "basetimestamp": "20211205060621",
    "starttimestamp": "20211205060621",
    "oldid": 0,
    "blockinfo": null,
    "canEdit": true,
    "content": ""
  }
}

The relevant code is here: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/VisualEditor/+/refs/heads/master/includes/ApiVisualEditor.php#334

And editing the file worked, no reload necessary: root@localhost:/var/lib/mediawiki/extensions/VisualEditor# vi includes/ApiVisualEditor.php

Next steps: track mediawiki configuration in git to make it all come together.