Extension talk:VisualEditor

Jump to navigation Jump to search

About this board

Please note that the Wikimedia Foundation does not provide support for installing VisualEditor on third-party wikis. However, if you have a question we may try to help.

Display permissions messages in VisualEditor

1
Saxlover98 (talkcontribs)

On my wiki I've got it set up that VisualEditor is the default editor, for the ease of use of the members. The problem is, with $wgEmailConfirmToEdit set, the VisualEditor doesn't alert users that they need to confirm their email before editing.

Users will go to edit a page without confirming their email, and the VisualEditor just loads with everything grayed out and no explanation as to why. If you switch to the "edit source" tab with the built-in wikitext editor, it displays "You must confirm your email address before editing pages". This also extends to any other permissions messages that are normally displayed in the built-in wikitext editor.

Is there a way to add those permissions alerts to the VisualEditor, similar to how the alert about editing from an IP address displays? My current workaround is using a site wide dismissable notification telling users to confirm email before editing since VisualEditor doesn't display anything.

Reply to "Display permissions messages in VisualEditor"

fail to switch to VisualEditor

1
Onebigear (talkcontribs)

hello! I loaded the extension in LocalSettings.php file, when I clicked edit, Visual Editor's interface popped for one second, and asked if I will switch to VisualEditor, but I missed it and clicked on something else..I am stuck with the plain editing interface.

I tried to remove the VisualEditor from /var/lib/extensions/ and re-upload again and load LocalSettings.php again, but the notification never pops up..


any clues?

Reply to "fail to switch to VisualEditor"

Can able to configure Visual Editors

1
Iankush raj (talkcontribs)

I can't able to edit from visual edit it shows VirtualRESTService is defined how can I define that

Reply to "Can able to configure Visual Editors"

Pages with slashes (/) in title result in 404 error

2
Dstoeltz (talkcontribs)

It appears visual editor does not work with pages that have slashes in their titles. When trying to save edits to these pages, or create a new page with a slash in the title, it results in an "apierror-visualeditor-docserver-http: HTTP 404" error. Watching the parsoid logs, you can see that the request never even makes it to parsoid if this is the case.

I recently updated a wiki which already has a bunch of pages with slashes in the titles which have not posed an issue until now. Is there a workaround or a planned fix for this?

Prh47bridge (talkcontribs)

I've just solved this for my wiki. The request isn't even getting as far as Restbase, let alone Parsoid. To fix it you need to have:

AllowEncodedSlashes NoDecode

in your Apache configuration. Without that, Apache rejects any urls with encoded slashes. Also, you need to add the nocanon directive on the end of the ProxyPass line.

Reply to "Pages with slashes (/) in title result in 404 error"

In-VE User Guide link - error Bad title

5
TiltedCerebellum (talkcontribs)

I can't seem to find an option to set a different URL for the VE User Guide page and it currently attempts to go to an invalid internal URL (https://mysite.com/Mw:Special:MyLanguage/Help:VisualEditor/User_guide). Not sure why. Any clue on how this can be set/changed? I didn't see an option in the documentation, I'm probably missing something.

Also, VE seems to work great with Mediawiki responsive skin Pivot. I had to make only one small tweak to the CSS for it, and it now works perfectly. :) TiltedCerebellum (talk) 04:50, 15 December 2019 (UTC)

Jdforrester (WMF) (talkcontribs)

It's expecting you to have "mw" as an interwiki to MediaWiki.org, which is built-in. It seems like you've removed it, and so broken that link?

TiltedCerebellum (talkcontribs)

Thanks for the clarification, I think I figured out how to fix it. It is a friend's wiki and I don't know why they changed this but looks like the correct interwiki address is there but they disabled forward. Works now with foward enabled TiltedCerebellum (talk) 22:04, 16 December 2019 (UTC)

Maiden taiwan (talkcontribs)

I have this problem too, even though the interwiki prefix "mw" is defined on my site. I can create a link [[mw:Special:MyLanguage/Help:VisualEditor/User_guide]] in an article and it works just fine. But inside VisualEditor, when I select the help link "Read the user guide", it's invalidly linked to http://name-of-my-wiki/Mw:Special:MyLanguage/Help:VisualEditor/User_guide. This is with MW 1.34.1.

How did you solve it? What does "they disabled forward" mean?

I looked in wp_interwiki, and iw_local = 0. I set its value to 1 but this did not change the behavior. (I also restarted Apache & memcached and ran maintenance/runJobs.php just in case.)

Thank you.

TiltedCerebellum (talkcontribs)

I went to Special:Interwiki and in the Interwiki Prefixes tablem I made sure the URL was correct and made sure its corresponding prefix and url were correct and under the "Forward" column that it was enabled.

Cheers.

Reply to "In-VE User Guide link - error Bad title"

How do I perform search only into the local base when using "Insert > Media"?

1
Summary by Spas.Z.Spasov

We need $wgUseInstantCommons = false; in order to get this to work.

Spas.Z.Spasov (talkcontribs)

Hello, I'm using VisualEditor on MwdiaWiki 1.32.1 and it everything works fine! :)

I just wonder is there any way to force VisualEditor to perform only local search when I'm using the "Insert > Media" feature? It could be perfect If I could restrict this search to the local base via LocalSettings.php.

curl_multi_init() has been disabled for security reasons

3
Lostact (talkcontribs)

Our hosting provider has disabled this function. We them asked to enable it but they refused. Creating new pages is fine but when i try to edit pages i get:

internal_api_error_Exception: Exception caught: PHP cURL function curl_multi_init missing.


Is there any workaround for this problem?

Jdforrester (WMF) (talkcontribs)

Since REL1_32 (for T139169), there's been a fallback to a non-parallel system that doesn't use curl if it's unavailable, but that was written assuming curl was intact. :-)

I've written this patch to also sniff for curl_multi_init and fallback; if that's merged, it'll ship with MediaWiki 1.35 unless we back-port it. Sorry that that's not an immediate fix.

Lostact (talkcontribs)

I applied this fix and my problem is solved. Thank you!

Ciciban (talkcontribs)

Dear All,
I have installed this extension and now I am getting the following error report when I try to open a nonempty page with the VisualEditor:

Fehler beim Laden der Daten vom Server: apierror-visualeditor-docserver-http-error: (curl error: 7) Couldn't connect to server. Soll der Vorgang erneut durchgeführt werden?

I can open nonempty pages vith the VE, but then I get this error report when I am trying to save the edit:

Etwas ist schief gelaufen
(curl error: 7) Couldn't connect to server

Parsoid/Troubleshooting doesn't help me a lot until now: e.g., what would be the positive result of

curl http://your-mediawiki-server/api.php

(http://localhost/mediawiki/api.php in my case)
and what the negative? and why should I set this URL in [my] /etc/mediawiki/parsoid/settings.js if I'm supposed not to have that file, but configure parsoid via /etc/mediawiki/parsoid/config.yaml (where I have set that URI btw)?
Thank you in advance!
Ciciban (talk) 16:03, 21 January 2018 (UTC)

46.219.43.18 (talkcontribs)

uninstall and purge parsoid

install parsoid again

Ciciban (talkcontribs)

Thanks for your answer.
It did not change anything :(
Yours, Ciciban (talk) 13:28, 22 January 2018 (UTC)

Ciciban (talkcontribs)

So, let's start from scratch with Parsoid/Troubleshooting.

My api.php is http://localhost/mediawiki/api.php, which is linked to /var/lib/mediawiki-1.30.0/api.php.
Consequently, I changed /etc/mediawiki/parsoid/config.yaml (btw, locate delivers two other files with this name: /usr/lib/parsoid/node_modules/service-runner/config.yaml and /usr/lib/parsoid/src/tests/mocha/test.config.yaml):
# uri: 'http://localhost/w/api.php'
uri: 'http://localhost/mediawiki/api.php'

curl -L http://localhost:8142/localhost/v3/page/ html/Hauptseite>curl.htm
leaves a html-page similar to my main page in curl.htm, plus it returns

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  
Current 
                                 Dload  Upload   Total   Spent    Left  
Speed 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--
100    62  100    62    0     0     79      0 --:--:-- --:--:-- --:--:--
100    62  100    62    0     0     79      0 --:--:-- --:--:-- --:--:--
    79 
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--
100  6140  100  6140    0     0   2970      0  0:00:02  0:00:02 --:--:--
 21928
 

to my console. Is this, in the sense of Parsoid/Troubleshooting, the positive or the negative result, resp., what does this exactly mean?

Thank you in advance for your answers.
Yours, Ciciban (talk) 10:11, 24 January 2018 (UTC)

Thedonquixotic (talkcontribs)

I am also having this trouble @Ciciban Did you ever find a fix?

Ciciban (talkcontribs)
Mariuszjluther (talkcontribs)

I had this problem under Win10 as log as I haven't startet manually the parsoid server:

C:\Users\User\node_modules\parsoid> node bin/server.js

After that it worked.

Ciciban (talkcontribs)

O.k., Maybe I have just found a lead:

curl http://localhost/mediawiki/api.php

returns the source of api.php

curl https://localhost/mediawiki/api.php

returns: curl: (7) Failed to connect to localhost port 443: Verbindungsaufbau abgelehnt

So, how can I contact my localhost via https (and, could this solve my problem)?

Thank you in advance for your help.
Yours, Ciciban (talk) 11:38, 13 April 2020 (UTC)

Ciciban (talkcontribs)

I hoped I could solve the issue with mkcert localhost, but I still cannot reach api.php via https, neither via curl nor in the browser, whereas it does work both ways via http.
Any hints?
Yours, Ciciban (talk) 15:46, 13 April 2020 (UTC)

Ciciban (talkcontribs)
Reply to "curl error: 7"
Tormentium (talkcontribs)

Hi,

Alright, i just wanted to know, is there a way to change the port that parsoid uses? My host supports node.js apps but it has restrictions on what ports are open and the ports used by parsoid (8000,8142) are blocked and because they cannot unblock them (for security reasons) i am unable to complete the parsoid installation and have it be used with my mediawiki installation.

Any help is GREATLY appreciated.

Thank you!

Whatamidoing (WMF) (talkcontribs)

Hi Tormentium,

I think you need to talk to your network administrator about exactly what those "security reasons" are. https://isc.sans.edu/port.html?port=8142 doesn't give me any obvious reasons to be concerned. AIUI, the most typical approach that would result in both of those ports being blocked is a blanket blacklist of all ports except those few that the network administrator has been told are needed. (This is particularly popular when the IT staff has limited resources.) If that's the case, then you should be able to get these two added to the whitelist by explaining why you need them open.

That said, the software is open source, so theoretically you could change the numbers to whatever you wanted.

41.222.180.180 (talkcontribs)

Hi

I also want to know the same thing. How can I change the port?

Because my server has 8000 and 8142 ports closed, so I have to use different port.

Maybe I can use,,,,

【web】

・http(80)

・https(443)

【FTP】

・ftp(21)

・ftp over ssl(21)

・ftp-data

【SSH】

・SSH(10022)

【mail】

・smtp (25、587)

・smtp over ssl(465)

・pop(110)

・pop over ssl(995)

・imap(143)

・imap over ssl(993)

Is it available on these ports?

Please help me.....................

MarcoFerra1979 (talkcontribs)

@Tormentium @Whatamidoing (WMF)

this is my experience regarding the port for Parsoid.:

I had to say that I am not expert in JSON nor parsoid, but I changed the port here:

FIle: \parsoid\lib\api\ParsoidService.js (folder where Parsoid is installed)

LINE: || parsoidConfig.serverPort || process.env.PORT || 8142;

My value was 8000 (I followed developer setup) and I changed to 8142 > worked

I changed to 8150 > worked

once you run the server with command node /bin/server.js from windows cmd, you should see the port:

read on: <port you wrote>

{"name":"lib/index.js","hostname":"<the name of your web host, apache>","pid":14548,"level":30,"levelPath":"info","msg":"ready on :8150","time":"2020-04-11T14:03:03.304Z","v":0}

I did not widely test, but only with curl and opening with browser

both success.

I hope this help

Reply to "Change Parsoid port"

VisualEditor is not compatible with the current MediaWiki core (version 1.34.0), it requires: >= 1.35.0PHP Fatal error: Uncaught ExtensionDependencyError: VisualEditor is not compatible with the current MediaWiki core (version 1.34.0), it requires: >= 1.35.0

2
109.230.45.242 (talkcontribs)

PHP Fatal error:  Uncaught ExtensionDependencyError: VisualEditor is not compatible with the current MediaWiki core (version 1.34.0), it requires: >= 1.35.0

Jdforrester (WMF) (talkcontribs)