About this board

Previous discussion was archived at Talk:VisualEditor/Archive 1 on 2015-09-01.

On MW1.40 setting $wgReadOnly breaks VisualEditor

SyncmasterN (talkcontribs)

So I was upgrading MW from 1.39 to 1.40 and following the guide here and here, I set $wgReadOnly in the LocalSettings.php, all things good, after completing the upgrade I started checking some of the pages for content and forgot to delete $wgReadOnly from config.

When trying to edit a page with VisualEditor, I was getting this error: Unable to fetch Parsoid HTML

I was sure this was an upgrade issue but it turns out that deleting the property is the fix.

Installed software

Product Version
MediaWiki 1.40.1
PHP 8.1.14 (fpm-fcgi)
ICU 67.1
MariaDB 10.6.11-MariaDB-1:10.6.11+maria~ubu2204
Lua 5.1.5
Pygments 2.11.2
  • In MW 1.39, VisualEditor still works when $wgReadOnly is set.


Reply to "On MW1.40 setting $wgReadOnly breaks VisualEditor"

Gallery mode packed not working

Sm8ps (talkcontribs)

VE-0.1.2 on MW-1.39.4 does allow the selection of "packed" for a gallery but does not include it in the resulting Wiki-code. Thus galleries always appear in mode "traditional". Am I the only one experiencing this issue? If not, could somebody point me to the right place for filing a bug report? I have never done it before. Thanks!

Whatamidoing (WMF) (talkcontribs)
Reply to "Gallery mode packed not working"

VisualEditor in Namespace Project

Patafisik (talkcontribs)


I would love to be able to use the VisualEditor in projects and projects talks pages, please consider make it possible. Thank you for your attention,

Whatamidoing (WMF) (talkcontribs)

This requires a config change. As long as there is community consensus (e.g., a discussion on that wiki) and no technical problems (e.g., the namespace does not contain huge pages like w:en:WP:ANI), then the team is happy to honor such requests. The instructions are in m:Requesting wiki configuration changes.

Reply to "VisualEditor in Namespace Project"

bug of Find and replace

Patafisik (talkcontribs)
Reply to "bug of Find and replace"
Iniquity (talkcontribs)
Iniquity (talkcontribs)

Magic word __SOMMAIRE__

Summary by Jdforrester (WMF)
Patafisik (WMF) (talkcontribs)

Hi, many users are reporting that a mass adding of the magic word __SOMMAIRE__ ( like __TOC__) is happening on the French Wikipedia (1, 2), when editing with VisualEditor. Do you know anything about this?

Whatamidoing (WMF) (talkcontribs)
SSastry (WMF) (talkcontribs)

Yes, it is.

Reply to "Magic word __SOMMAIRE__"

Wikia credits missing from history?

Zblace (talkcontribs)

According to the Verge article it seems that there was a partnership in development of VE that should be referenced no? Anyone informed on how it went and how exceptional this was or not from regular WMF practices?

Jdforrester (WMF) (talkcontribs)

The credits file for VisualEditor (as auto-published under Special:Version) lists the engineers from Wikia (Christian and Inez) alongside those from Wikimedia (and those from other organisations).

Reply to "Wikia credits missing from history?"

Migrating extension to new version

Ti infotrad (talkcontribs)

I presently have a couple of extensions which are integrated with VisualEditor in MW 1.35. I am trying to migrate them to the new version (MW 1.39 RC1, downloaded zip) but I am getting a number of errors: non existing functions (template spec extend, onRawFallbackButtonClick, getParameterNames..). I have not been able to find documentation explaining how to migrate. Is there any available? Any help you can provide? I also could not find a list of extensions integrated in VE, which I could use to perform code comparisons.

Ti infotrad (talkcontribs)

And to be ultra precise, here is the error I am getting. Note I have not changed the code and it was working fine in my previous version of MW.

In my extension module, I have implemented the function insertTransclusionNode. In it, when inserting a new node, once I have build my object (getPlainObject), I call the following function

surfaceFragment.insertContent( [{type: 'gacdmslinker',attributes: {mw: obj,calaction: 'insert'}},{ type: '/gacdmslinker' }] );

and this is when I get the following error:

VM522:28 Uncaught TypeError: Converting circular structure to JSON

    --> starting at object with constructor 'VeDmDocument'

    |     property 'bindings' -> object with constructor 'Object'

    |     property 'transact' -> object with constructor 'Array'

    |     ...

    |     property 'context' -> object with constructor 'VeDmInternalList'

    --- property 'document' closes the circle

    at JSON.stringify (<anonymous>)

    at (load.php?lang=en&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector&version=1lvvz:180:941)

    at OO.EventEmitter.emit (<anonymous>:28:656)

    at (load.php?lang=en&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector&version=1lvvz:175:902)

The weird thing is, my object (gacdmslinkernode) is still created in the sense that, if I save the document and re-edit it with VE, it shows up correcly. However, the error seems to be preventing the insertion of the title of the object (but not of the associated icon) and instead it uses the page title as the title. And also, when I update an existing node, I get no error and it works fine.

Reply to "Migrating extension to new version"

How to hook before "EDIT" in the visual editor?

1 (talkcontribs)

I'm studying to create my own extension with Visual Editor, and I'm struggling to figure out how I can make a hook in the dialog pop up for the contents.

For example, I'm making a traditional tag extension, like <ABC> MY TEXT </ABC>

And, When I enter the Visual Editor, the tag can be edit through the pop-up box, and the "Code" section shows "MY TEXT". This is good.

Now, before giving the text of "MY TEXT" to the "Code" section in the pop-up box, I want to manipulate the "MY TEXT" and give the manipulated string to the "Code" section.

For example, I want to give "_MANIPULATED_ MY TEXT _DONE_" to the "Code" section in the pop-up box in the Visual Editor instead of "MY TEXT" string.

Can someone help me how I can achieve the goal, please?

Reply to "How to hook before "EDIT" in the visual editor?"

Enable Automatic citation in Nepali Wikipedia.

Summary by Whatamidoing (WMF)
बडा काजी (talkcontribs)

Automatic citation is feature in most Wikis but not in Nepali Wiki. It would be a very handy new tool to have. Any ideas how you enable it?

Jdforrester (WMF) (talkcontribs)

You need to configure your wiki to handle it: Citoid/Enabling Citoid on your wiki. This can be a little complicated, as it's built around the needs and processes of the bigger Wikipedias at the time, but should be do-able.

Reply to "Enable Automatic citation in Nepali Wikipedia."