Extension talk:VisualEditor/2017/03
This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
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.
Visual editor not find templates
I m trying to add template into page from VisualEditor. Template is existing and can added to page with wiki-editor. In VisualEditor dropdown list is empty. Also I cant get list of template's parametres and it's description (generated by Extension:TemplateData).
Example: I need to add template Markup into my page. Its sending to api:
1. /w/api.php?action=query&format=json&titles=mar
- {batchcomplete: "",…}
- batchcomplete:""
- query:{normalized: [{from: "mar", to: "Mar"}], pages: {-1: {ns: 0, title: "Mar", missing: ""}}}
- normalized:[{from: "mar", to: "Mar"}]
- 0:{from: "mar", to: "Mar"}
- from:"mar"
- to:"Mar"
- 0:{from: "mar", to: "Mar"}
- pages:{-1: {ns: 0, title: "Mar", missing: ""}}
- -1:{ns: 0, title: "Mar", missing: ""}
- missing:""
- ns:0
- title:"Mar"
- -1:{ns: 0, title: "Mar", missing: ""}
- normalized:[{from: "mar", to: "Mar"}]
2. /w/api.php?action=query&format=json&prop=info%7Cpageprops&generator=prefixsearch&gpssearch=mar&gpsnamespace=10&gpslimit=10&ppprop=disambiguation&redirects=true
- {batchcomplete: ""}
- batchcomplete:""
On page VisualEditor:Test sends to api look different:
1. https://www.mediawiki.org/w/api.php...limit=10&ppprop=disambiguation&redirects=true
- {batchcomplete: "", query: {,…}}
- batchcomplete:""
- query:{,…}
- pages:{156418: {pageid: 156418, ns: 10, title: "Template:Markup", index: 2, contentmodel: "wikitext",…},…}
- 156418:{pageid: 156418, ns: 10, title: "Template:Markup", index: 2, contentmodel: "wikitext",…}
- contentmodel:"wikitext"
- index:2
- lastrevid:791571
- length:2133
- ns:10
- pageid:156418
- pagelanguage:"en"
- pagelanguagedir:"ltr"
- pagelanguagehtmlcode:"en"
- title:"Template:Markup"
- touched:"2017-01-17T12:42:54Z"
- 156419:{pageid: 156419, ns: 10, title: "Template:Markup/row", index: 1, contentmodel: "wikitext",…}
- contentmodel:"wikitext"
- index:1
- lastrevid:791591
- length:930
- ns:10
- pageid:156419
- pagelanguage:"en"
- pagelanguagedir:"ltr"
- pagelanguagehtmlcode:"en"
- title:"Template:Markup/row"
- touched:"2013-09-27T12:32:19Z"
- 156418:{pageid: 156418, ns: 10, title: "Template:Markup", index: 2, contentmodel: "wikitext",…}
- pages:{156418: {pageid: 156418, ns: 10, title: "Template:Markup", index: 2, contentmodel: "wikitext",…},…}
2. https://www.mediawiki.org/w/api.php...s=Template:Markup/row|Template:Markup&lang=en
- {pages: {}}
- pages:{}
Why my VisualEditor cannot find in namespace Template? 89.250.18.4 (talk) 04:12, 1 March 2017 (UTC)
- I won't be able to help you with the technical side. But I have a question: Can you insert *any* template? What happens if you type the name of the template in the box, ignore the missing search results in the dropdown menu, and click the button to insert it?
- Also, do you get search results if you try to insert "Template:Markup" (including the namespace) instead of "Markup"? Whatamidoing (WMF) (talk) 22:18, 2 March 2017 (UTC)
- This might be related to the TitleKey extension which breaks template search in visual editor. Extension talk:TitleKey/Archive 2/Flow export#h-Breaks_VisualEditor_autocompletion_for_templates-2018-05-04T15:51:00.000Z TiltedCerebellum (talk) 06:54, 13 July 2020 (UTC)
Incorrect searching text position
RESOLVED | |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Wrong HighlightingI've left a complain about this problem in ko:위키백과:사랑방 (기술)/2017년 2월#시각편집기 잘못된 찾기 기능 . I want to use changing tool safely, because of this bug, this tool may cause vandalism. But, more thing that is interesting is this bug only affects in same articles. I've re-started the computer and turned it back on and still. And one of the user said that it affects in some browsers. I use Google Chrome. Can anyone reply this? Thanks. Jerrykim306 (talk) 11:06, 2 March 2017 (UTC)
- If I go to https://ko.wikipedia.org/wiki/2013%EB%85%84_%ED%84%B0%ED%82%A4_%EB%B0%98%EC%A0%95%EB%B6%80_%EC%8B%9C%EC%9C%84?action=edit , and look for "Gezi", looks like the occurrences are found in the text, but they are not highlighted correctly (highlighting starts or ends close to the word, but doesn't just include it). Is this the problem? (I'm curious how this can cause vandalism though.) Elitre (WMF) (talk) 11:12, 2 March 2017 (UTC)
- Answering Is this the problem? and the answer is Yes. Because, if I use switch tool(Clicking on the white button which replaces highlighted), it will change in a same position where is highlighted not correctly. Jerrykim306 (talk) 11:17, 2 March 2017 (UTC)
- Now at https://phabricator.wikimedia.org/T159439, thanks for reporting here. Elitre (WMF) (talk) 11:51, 2 March 2017 (UTC)
RestBase Configuration
I need some help configuring LocalSettings.php for getting Restbase working with VisualEditor.
If I stop the Restbase-service, and remove according entries from LocalSettings.php, I am able to use VisualEditor, able to switch from VE to 'EditSource', but not able to switch back to VE without discarding any changes. So it seems Parsoid is installed properly.
If I start the Restbase-Server and enable to settings in LocalSettings.php, I am unable to open VE, I receive the Message 'Error loading data from server: Could not connect to the server'.
The RestBase installation seems ok, as 'http://localhost:7231/localhost/v1/' and 'http://my_internal_serverip:7231/localhost/v1/' is working.
Accessing mediawiki from a client, Firefox tells me that I am trying to access 'http://localhost:7231/localhost/v1/' - which imho does not make sense, as this 'localhost' is refering to my PC, but should refer to the server. Firefox console also tells me: Blocked loading mixed active content “http://localhost:7231/localhost/v1/page/html/File?redirect=false”
Here is my configuration: Server running Ubuntu 16.04 with a private Mediawiki 1.28 installed. Parsoid, CXserver, Restbase are on the same server. Access to the Mediawiki is (only) via 'https://wiki.mypage.com/Main_Page'. Parsoid is 'seeing' the wiki via 'https://wiki.mypage.com:8243' with no problem.
Here is relevant part from my Localsettings.php:
$wgVisualEditorParsoidURL = 'https://wiki.mypage.com::8143'; $wgVisualEditorParsoidPrefix = 'localhost'; $wgVisualEditorParsoidForwardCookies = false; $wgVisualEditorRestbaseURL = "http://localhost:7231/localhost/v1/page/html/"; $wgVisualEditorFullRestbaseURL = "http://localhost:7231/localhost/"; $wgVirtualRestConfig['modules']['parsoid'] = array( 'url' => 'https://wiki.mypage.com:8143', 'domain' => 'localhost', 'prefix' => 'localhost' ); $wgSessionsInObjectCache = false; $wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = false; $wgVirtualRestConfig['modules']['restbase'] = array( 'url' => 'http://localhost:7231', 'domain' => 'localhost', 'forwardCookies' => false, 'parsoidCompat' => false );
Thanks for your help!
TieMichael (talk) 14:08, 3 March 2017 (UTC)
- The key here is the message in your Firefox console: "Blocked loading mixed active content." You are running MediaWiki through SSL, but the server is making an unsecured RESTBase request to http://localhost:7231/... It looks as if you already run stunnel because you are serving Parsoid through SSL port 8143, so run RESTBase via stunnel through SSL port 7232. Of course, change all the references to port :7231 to port :7232. JohnNew (talk) 14:32, 3 March 2017 (UTC)
- Many thanks for this remark, I had a test wiki on HTTPS and got the error "Error loading data from server: Could not connect to the server" when switching WT -> VE. After severe doubts in my configuration given the sparse documentation, I thought it was because Restbase was only accessible on IPv6 in my installation, but indeed the issue was the mixed-content HTTPS (I thought Firefox would emit an alert but it (almost) silently refuse the connection, there is only this message in the console). ~ Seb35 [^_^] 17:47, 15 October 2017 (UTC)
- If the MediaWiki is just accessed locally, then SSL is of no use, so instead of configuring RESTBase with SSL, you might want to just use plain HTTP for all other services.
- If you, however, want to remotely access MediaWiki, then
- >> $wgVisualEditorRestbaseURL = "http://localhost:7231/localhost/v1/page/html/";
- needs to be modified; it defines the URL used by the client (e.g., Firefox) to access the RESTBase server directly, and "localhost" needs to be changed to a remotely accessible FQDN / IP address to make it work.
- The comment by John p new would still apply.
- (At least this is how I understood it — someone correct me if I am wrong.) 46.166.190.204 (talk) 01:28, 4 March 2017 (UTC)
- Thank you for our recommendation! If passible I'd like to access the wiki also remotely.
- I changed the 3 instances in my Localhost.php but did not touch the Restbase config.yaml:
$wgVisualEditorRestbaseURL = "https://wiki.mypage.com:7232/localhost/v1/page/html/"; $wgVisualEditorFullRestbaseURL = "https://wiki.mypage.com:7232/localhost/"; $wgVirtualRestConfig['modules']['restbase'] = array( 'url' => 'https://wiki.mypage.com:7232', 'domain' => 'localhost', 'forwardCookies' => false, 'parsoidCompat' => false );
- but, something is still wrong.
- I am able to access Restbase via https://wiki.mypage.com:7232/localhost/v1/.
- When using VE, Firefox is not trying to access: https://wiki.mypage.com:7232/localhost/v1/page/html/Franx but I also see:
- 'Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://wiki.mypage.com:7232/localhost/v1/page/html/Franx?redirect=false. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).' followed by 'RESTBase load failed: error'
- Any recommendations? My server uses nginx ...
- TieMichael (talk) 02:27, 4 March 2017 (UTC)
- Aaaand you have run into the same CORS roadblock that I have (same error messages, same result). I was hoping you wouldn't run into it and I could get some advice from you. :-)
- Now that someone else has the same issue, I'm going to head over to the wikitech-l mailing list and ask some questions (I've gotten a couple of answers so far that have helped me solve at least part of the VE/Parsoid/RESTBase setup puzzle).
- When I get an answer from that list, I will come back here and report, hopefully with a solution. JohnNew (talk) 06:05, 4 March 2017 (UTC)
- One step further:
- I installed nginx-extras and added these lines to my nginx-config:
- to the server-part:
more_set_headers 'Access-Control-Allow-Origin: * always'; more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE, HEAD'; more_set_headers 'Access-Control-Allow-Credentials: true'; more_set_headers 'Access-Control-Allow-Headers: Origin,Content-Type,Accept,Authorization';
- and to the 'location / {' part:
if ($request_method = 'OPTIONS') { more_set_headers 'Access-Control-Allow-Origin: * always'; more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE, HEAD'; more_set_headers 'Access-Control-Max-Age: 1728000'; more_set_headers 'Access-Control-Allow-Credentials: true'; more_set_headers 'Access-Control-Allow-Headers: Origin,Content-Type,Accept,Authorization'; more_set_headers 'Content-Type: text/plain; charset=UTF-8'; more_set_headers 'Content-Length: 0'; return 204; }
- and now VE is working ok for existing pages i.e. I am able to switch back and forth without saving.
- But creating new pages, still show the CORS error ....
- I am optimistic we will find a solution, an I know I am not the only one fighting :=)
- BTW: I also did a 'npm install cors', but not sure if need and/or helpful
- TieMichael (talk) 09:00, 4 March 2017 (UTC)
- >> Aaaand you have run into the same CORS roadblock
- One way is to have the content served from the RESTBase server coming from the same domain:port as your MediaWiki content — this way, you won't have any cross origin issues.
- I think this is the same way MediaWiki.org does it. I looked at the requests being sent when switching between editors, and they all go to mediawiki.org:80, so their RESTBase server gets accessed through the same domain:port (i.e., mediawiki:80).
- To have the MediaWiki content and the RESTBase content both being served on the same domain:port, you have to configure a reverse proxy on your Web server (e.g., Apache or NGINX) to proxy all requests matching the URL-path of requests destined to the RESTBase server.
- For example, if your RESTBase server URL is configured in your MediaWiki's LocalSettings.php as
- >> $wgVisualEditorRestbaseURL = "https://wiki.mypage.com:7232/localhost/v1/page/html/";
- where "localhost" is the domain on which MediaWiki is being served (it should actually be a remotely accessible domain, such as "wiki.mypage.com", since you want to give remote access to your MediaWiki), then you need to set up a reverse proxy handling all requests with a URL-path of "/localhost/" (or if you want remote access, "/wiki.mypage.com/").
- You can exactly determine the URL-path by checking your MediaWiki's LocalSettings.php file and taking the value you specified as "domain" (remember, the "domain" value is an arbitrarily chosen string, but it must match across all configurations [MediaWiki, Parsoid, and RESTBase]).
- I know that you are using NGINX, but I am using Apache, and my configuration looks like this:
</code> <VirtualHost *:80> ProxyPreserveHost On # Use a trailing slash to match everything starting with /wiki.mypage.com/... # See: https://httpd.apache.org/docs/2.2/en/mod/core.html#location <Location "/wiki.mypage.com/"> ProxyPass http://restbase:7231/wiki.mypage.com/ ProxyPassReverse http://restbase:7231/wiki.mypage.com/ </Location> # MediaWiki is located here: DocumentRoot /var/www/html </VirtualHost>
- Note that "/wiki.mypage.com/" in the <Location> directive above refers to the value you have specified as "domain" in your MediaWiki, Parsoid, and RESTBase configuration files (again, it is an arbitrarily chosen string).
- In the context above, "restbase" is a hostname which resolves to your RESTBase server's IP address, so in your setup, it could just be "localhost", since you said you have all 3 services (MediaWiki, Parsoid, and RESTBase) running on the same machine. 46.166.190.204 (talk) 16:23, 4 March 2017 (UTC)
- The problem, at least in my case, is that my MediaWiki content is served from a shared host. Because of that, I can't run Node.js/Parsoid/RESTBase on that host, so I set up a home server and pointed MediaWiki to it.
- Since I also don't have access to the web server configuration, can a reverse proxy be set up using the .htaccess file?
- If I can't solve the CORS issue, I have considered transferring my MediaWiki server to my home server, which would avoid this issue. If I do this, I will definitely try your Apache configuration.
- Another solution would be to set everything up on a VPS where you have root access, but of course with more control comes more cost. JohnNew (talk) 16:52, 4 March 2017 (UTC)
- I got a VPS for ~3 USD per month, so no real costs there. 46.166.190.204 (talk) 17:06, 4 March 2017 (UTC)
- >> Since I also don't have access to the web server configuration, can a reverse proxy be set up using the .htaccess file?
- I don't know. 46.166.190.204 (talk) 17:10, 4 March 2017 (UTC)
- Thank you 46.166.190.204! Your approach is working for me!
- to my nginx.conf I added:
location /wiki.mypage.com/ { proxy_pass http://localhost:7231/; }
- and changed LocalSettings.php to
$wgVisualEditorRestbaseURL = 'https://wiki.mypage.com/wiki.mypage.com/localhost/v1/page/html/'; $wgVisualEditorFullRestbaseURL = 'https://wiki.mypage.com/wiki.mypage.com/localhost/'; $wgVirtualRestConfig['modules']['restbase'] = array( 'url' => 'https://wiki.mypage.com/wiki.mypage.com', 'domain' => 'localhost', 'forwardCookies' => false, 'parsoidCompat' => false );
- I was also able to remove all the CORS lines I added yesterday.
- Now VisualEditor seems working fine for me, as I am able to create pages with VE, and switch back and forth between VE and the 'normal editor' without saving.
- Thanks for all your help!
- TieMichael (talk) 04:31, 5 March 2017 (UTC)
- Hello,
- I went through the same issues as you did, more or less. I set up everything without SSL (http) then I added the SSL (https) and it broke Restbase (it was working only when the configuration lines related to RestBase in LocalSettings.php where deleted (commented). It was not making any error, it was not making anything, when I click edit, just nothing happen. Then I did the reverseproxy trick and change RestBase configuration without the specific port (as suggested) and now Restbase was able to go from text editor to VE, but VE was not able to pull any data from the page (it was starting a new page each time I edited from VE and if I try to save, I got an error with CURL: "docserver-http-error: (curl error: 60) Peer certificate cannot be authenticated with given CA certificates"
- If I comment RestBase lines again, Parsoid and VE are again working fine. If I try to open in Firefox or Chrome the RestPage page at https://mywikiserver/mywiki/v1, I can see the page, but if I enter https://mywikiserver/mywiki/v1/page/html/Main_Page I don't see the content of the Main_Page (it was working without SSL).
- Note about my install: it is a private wiki, accessible only from a local intranet but as we integrate LDAP we want to enforce SSL anyway (and by principle I want to do the thing right).
- Any idea what could be wrong with my install ? ElucTheG33K (talk) 14:06, 1 June 2017 (UTC)
- Hello,
- 46.166.190.204 from above here.
- @ElucTheG33K, you have to specify your web server's SSL certificate in your
php.ini
. Find the section below inphp.ini
, and modify the path to the SSL certificate to match your environment. [curl] ; A default value for the CURLOPT_CAINFO option. This is required to be an ; absolute path. curl.cainfo = "/usr/local/etc/php/ssl/mywiki.crt"
- You can manually provoke the cURL error 60 by trying to access your web server from the server handling the PHP requests (possibly the same server).
bash-4.3# curl https://wiki.mypage.lcl curl: (60) SSL certificate problem: self signed certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.
- Now, the same, but with the web server's certificate specified.
- 212.92.123.222 (talk) 01:00, 19 June 2017 (UTC)
bash-4.3# curl https://wiki.mypage.lcl --cacert /etc/nginx/ssl/mywiki.crt <successful request>
- This only indirectly relates to the original error stated, but because this page is at the top of Google's search results, and it can solve another problem related to SSL / TSL, Visual Editor, VisualEditor, Mediawiki, error 60 about peer certificate, and stunnel, I'm posting it here to hopefully save someone a lot of work.
- I'm working with CentOS 7.6, Mediawiki 1.33, and other, as of 9.2019, up to date services like parsoid, etc. I'm not including all of the details to set up Visual Editor to work with SSL, just the solution for the issue I ran into.
- I could not get VisualEditor, Parsoid, and Mediawiki to work with a self signed certificate, even when setting the strictSSL: false setting in the config.yaml file.
- I also couldn't get a certificate obtained from GoDaddy to work until I found the solution.
- Inexpensive SSL / TSL certificates usually come with and require an intermediate certificate. To get it to work I got a key tip from this posting: https://serverfault.com/questions/254795/how-do-i-ensure-that-stunnel-sends-all-intermediate-ca-certs
- Solution: Configure the STUNNEL configuration files cert line to point to a single file that contain the server certificate and intermediate certificate.
- Example line for STUNNEL configuration file:
- cert = /WhatEverPathName/CertificateFile (can be a .crt or .pem file), where CertificateFile contains the signed server certificate and intermediate certificate in that order (IE intermediate at the end of the file). Terrawide (talk) 01:54, 7 September 2019 (UTC)
- I was too getting same issue but i have resolved in my wiki1.31
- These are the wiki config:
- $wgMathFullRestbaseURL= 'https://mywikiurl.com/gd_endpoint/localhost/'; #Restbase Server
- $wgVirtualRestConfig['modules']['restbase'] = array(
- 'url' => 'https://mywikiurl.com/gd_endpoint/',
- 'domain' => 'localhost',
- );
- ----
- ----
- ----These are the Proxy(Apache) setting:
- #setting proxy start here
- SSLProxyEngine on
- <Location /gd_endpoint/>
- ProxyPass http://ashsd95054.becpsn.com:7231/
- ProxyPassReverse https://ashsd95054.becpsn.com:7231
- Order deny,allow
- Deny from all
- Allow from all
- </Location>
- #setting proxy end here
- <VirtualHost *:443>
- DocumentRoot /var/www/html
- #ServerName www.yourdomain.com
- SSLEngine on
- #setting proxy start here
- SSLProxyEngine on
- <Location /gd_endpoint/>
- ProxyPass http://your restbase server .com:7231/
- ProxyPassReverse https://your restbase server .com:7231
- Order deny,allow
- Deny from all
- Allow from all
- </Location>
- #setting proxy end here
- SSLCertificateFile /etc/httpd/ssl/www.cer
- SSLCertificateKeyFile /etc/httpd/ssl/dev.key
- SSLCertificateChainFile /etc/httpd/ssl/crt.cer
- </VirtualHost>
Rajeshrajesh.35 (talk) 06:48, 9 September 2019 (UTC)
VE by default
Is possible to set Visual Editor to edit and create pages? Bty0808 (talk) 19:05, 7 March 2017 (UTC)
- Yes, if the wiki has the Single Edit Tab (SET) system installed. If SET is available, then Special:Preferences#mw-prefsection-editing will show a drop-down menu called "Editing mode" at the end of the "Editor" section. However, that might not be available for third-party wikis yet. Whatamidoing (WMF) (talk) 20:37, 7 March 2017 (UTC)
- Sorry I forgot to mention that it is a private wiki. Bty0808 (talk) 12:47, 10 March 2017 (UTC)
- I suppose that you might be able to do something with CSS to hide the 'Edit source' button, or re-label it as "The Wrong Button" or something, but I don't think that there is actually a good solution for you right now. I'm sorry. Whatamidoing (WMF) (talk) 19:43, 10 March 2017 (UTC)
1.28 version breaks with extensions that hook to PageContentSaveComplete etc.
Couldn't find where issue tracker for this extension is so submitting this here. I have extension SlackNotifications and couple more notification extensions which hooks to for ex. PageContentSaveComplete and PageContentInsertComplete. When adding my extension that uses this hook, I get error Unknown error when trying to save or insert any article using the VisualEditor extension. Saving from "Edit Source" dialog everything works fine. Seems like when other extension is using the same hooks that VisualEditor is, VisualEditor hooks don't go through.
This does not generate any error in php, apache error log files nor chrome console so it is hard to debug where the error gets generated from. I could not also find any references to "Unknown error" from VisualEditor source files. Is this error already resolved in later VisualEditor version (>1.28)? Kulttuuri (talk) 09:26, 11 March 2017 (UTC)
- Issues are tracked on Phabricator. The project is here: https://phabricator.wikimedia.org/project/profile/483/
- I don't recall seeing any previous reports from anyone using SlackNotifications. Whatamidoing (WMF) (talk) 00:30, 14 March 2017 (UTC)
- Thanks! Will report an issue there. Kulttuuri (talk) 14:55, 26 March 2017 (UTC)
- @Kulttuuri, can you point me to the phabricator issue? I'm still having this problem on MW 1.31. Berekuk (talk) 14:31, 23 June 2018 (UTC)
Can the VisualEditor be used with MediaWiki 1.27.1?
RESOLVED
Yes.
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Can the VisualEditor be used with MediaWiki 1.27.1? Jensbest (talk) 21:07, 14 March 2017 (UTC)
- Yes, it should work OK. Remember to check out the 1.27-compatible branch from Special:ExtensionDistributor/VisualEditor (in the drop-down). Jdforrester (WMF) (talk) 21:12, 14 March 2017 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.
curl error: 60
RESOLVED
Mis-configuration and probably issue with an HTTP Authentication on the wiki.
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I'm running MediaWiki 1.27.1 (with https connection) on Windows Server 2012 and IIS. So far, I haven't been able to get Visual Editor to work. I have installed parsoid and the Visual Editor extension. I also have parsoid running, but when I try to edit pages, I receive the following error message:
"Error loading data from server: (curl error: 60) Peer certificate cannot be authenticated with given CA certificates: docserver-http-error: (curl error: 60) Peer certificate cannot be authenticated with given CA certificates. Would you like to retry?"
I'm guessing that this has something to do with the SSL certificate, but I don't know how to get Parsoid to work with it. Does anyone have any suggestions? Ganomix (talk) 10:19, 22 March 2017 (UTC)
- Managed to fix this error with the following instructions:
- Use this certificate root certificate bundle:
- https://curl.haxx.se/ca/cacert.pem
- Copy this certificate bundle on your disk. And use this on
php.ini
curl.cainfo = "path_to_cert\cacert.pem"
- However, now I get error 401. I set localsettings.php to forward the cookies, but error 401 is still displayed.
- I also allowed the Parsoid server (User:Andru~mediawikiwiki/Allow Parsoid Server), but error 401 didn't go away with these instructions either. Ganomix (talk) 10:57, 22 March 2017 (UTC)
- Is it a public wiki?
- The two communications between VE and Parsoid should be checked:
- VE -> Parsoid: is it on localhost? and http?
- Parsoid -> VE: this is a https connection from nodejs (Parsoid), so nodejs must trust the wiki certificate
- Probably the last point is missing, and I guess you have a self-signed certificate or an uncommon/private CA. Until quite recent nodejs versions, it was not possible to change the certificate store (see ); now it is possible with the very recent versions of nodejs (newer than end of 2016). So you should install a very recent version of nodejs and make sure the wiki certificate is recognized by a CA in the system certificate store. ~ Seb35 [^_^] 11:16, 22 March 2017 (UTC)
- My previous answer was too late :)
- In LocalSettings, did you configure $wgVirtualRestConfig? (There are older configuration parameters which should no more be used.) ~ Seb35 [^_^] 11:22, 22 March 2017 (UTC)
- Thanks for the reply. It is a private wiki. I managed to bypass the 401 error by disabling Basic Authentication and enabling Anonymous Authentication for api.php in IIS.
- However, now I ran into yet another issue. When I click edit, the Visual Editor starts loading but the loading bar gets stuck at 100 %, and I am not able to edit the page.
- I have configured $wgVirtualRestConfig as follows:
$wgVirtualRestConfig['modules']['parsoid'] = array(
// URL to the Parsoid instance
// Use port 8142 if you use the Debian package
'url' => '<nowiki>https://hostname/wiki/api.php'</nowiki>,
// Parsoid "domain", see below (optional)
'domain' => 'localhost',
// Parsoid "prefix", see below (optional)
'prefix' => 'localhost'
);
- Did I make some mistake there? Ganomix (talk) 11:54, 22 March 2017 (UTC)
- Visual Editor seems to be working for me now. I simply removed the code above from LocalSettings.php, and it started working. Ganomix (talk) 13:14, 22 March 2017 (UTC)
- I guess it works because default parameters are fine for you: your Parsoid is listening on localhost on port 8000. In $wgVirtualRestConfig, the 'url' parameter must be the address (IP+port) of Parsoid (=the external programm running with nodejs), so e.g. something like 'http://127.0.0.1:80'.
- So probably you don’t have to change these default parameters, but it better to understand the exact meaning of these basic parameters.
- And given you mention there were a Basic Authentication, it was probably the issue, I never saw Parsoid used for a HTTP-Authenticated wiki and I guess it is not implemented. If you want to harden a bit the configuration, you can disable authentication for api.php only for localhost. ~ Seb35 [^_^] 14:05, 22 March 2017 (UTC)
- With your $wgVirtualRestConfig, VisualEditor called itself and at the same time expected to talk to Parsoid, so it created a loop and the 401 error was probably because of that. ~ Seb35 [^_^] 14:08, 22 March 2017 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.
New Gallery editor on MW 1.27
I see that new gallery editor has been added to VisualEditor but would like to know whether a MW running on v1.27 can upgrade to latest snapshot VisualEditor to use this new gallery editor? The extension distributor for MW1.27 still gets the snapshot of version 9da5996 of the VisualEditor extension. Are users stuck with older version even for supported versions of MediaWiki? I see the download note specifying alpha builds of MediaWiki for master branch of VisualEditor. 49.207.58.37 (talk) 08:18, 23 March 2017 (UTC)
- Also I couldn't find how to upgrade VisualEditor extension to newer version. Can anyone please point to any documentation to do this? 49.207.58.37 (talk) 08:33, 23 March 2017 (UTC)
- Real answer: I don't know.
- Best guess: Generally, you need the versions for MediaWiki, Parsoid, and VisualEditor to all match. Whatamidoing (WMF) (talk) 21:59, 26 March 2017 (UTC)
VisualEditor failed to load: Error: Module ext.visualEditor.core has failed dependencies
I'm having difficulty getting VisualEditor to work with the latest alpha build (1.29.0-alpha). When I click on any of the Edit links, the VisualEditor fails to appear, with the following warning being logged to the console:
VisualEditor failed to load: Error: Module ext.visualEditor.core has failed dependencies
I did remember to run "git submodule update --init" from inside the VisualEditor source directory. 210.0.232.132 (talk) 04:20, 27 March 2017 (UTC)
- If you forgot to execute the "git submodule update --init" command at first and you executed it after you realized you forgot, perhaps you have to hard-refresh your browser cache (Ctrl-F5 or Ctrl-R or similar command; a simple F5 or button "refresh" could not be enough). Another mean to check is to start a private session on Firefox.
- If it doesn’t work, there would be another issue somewhere. ~ Seb35 [^_^] 09:14, 27 March 2017 (UTC)
- For some reason, I wasn't getting all of the dependencies. I eventually got it working by just deleting the whole VisualEditor directory and starting again from scratch with 'git clone' and 'git submodule update --init'.
- However, now I'm finding that, although the Visual Editor bar appears and I can edit the text in a page, there is just one issue remaining. For some reason, all of the SyntaxHighlight_GeSHi fields go invisible when editing a page. They appear again after cancelling or saving an edit – but can't be seen while editing a page. I've tried clearing my browser cache, using other browsers, etc... and there don't seem to be any JavaScript errors being logged to the console. The <span> for the syntax-highlighted code section appears as follows, when editing:
- <span class="ve-ce-leafNode ve-ce-focusableNode ve-ce-mwSyntaxHighlightNode" contenteditable="false"></span>
- As you can see, the actual content is empty. When not editing, it looks like this:
- <div class="mw-highlight mw-content-ltr" dir="ltr"><syntaxhighlight lang='text'>$ ansible-playbook ci_up.yml
</syntaxhighlight></div>
- Has anyone else experienced this? 210.0.232.132 (talk) 02:58, 28 March 2017 (UTC)
- The VisualEditor is improving everytimes, and the version installed on MediaWiki.org is always the most recent (updated every week) and properly installed, and I can see it works on page Extension:VisualEditor#Basic configuration for MediaWiki-VisualEditor.
- So you can check your versions of VisualEditor and SyntaxHighlight against MediaWiki.org’s ones and then check your configuration against MediaWiki.org’s one (mainly files CommonSettings.php and InitialiseSettings.php).
- Perhaps check the order and loading methods: Wikimedia uses
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
then require_once "$IP/extensions/VisualEditor/VisualEditor.php";
. ~ Seb35 [^_^] 07:49, 28 March 2017 (UTC)
Error loading data from server: HTTP 0
I'm running a private wiki (MediaWiki 1.27.1 with https connection) on Windows Server 2012 and IIS. HTTP Authentication is disabled for api.php, though only for localhost.
My Visual Editor was working fine earlier, but today it suddenly stopped working. Whenever I try to edit a page with the Visual Editor, the editor loads for about 30 seconds and then displays the message "Error loading data from server: HTTP 0. Would you like to retry?". However, I can create a new page with the Visual Editor and save it. The problem only occurs when editing pages.
I'm guessing that this is an issue with communicating with Parsoid. When looking at the parsoid cmd window, parsoid does appear to parse the page (the cmd window displays e.g. "completed parsing in 34003 ms". However, the parsing seems to actually start only after the HTTP 0 error message in displayed in my browser.
Does anyone have any idea on how to solve this issue? Ganomix (talk) 09:41, 30 March 2017 (UTC)
- I just reinstalled Parsoid, and Visual Editor is working fine now. Ganomix (talk) 11:54, 30 March 2017 (UTC)
- This same problem returned again today. Yesterday Visual Editor was working fine, but when I tried to use it again today, it gives the HTTP 0 error after 30 seconds of pressing the edit button (sometimes HTTP 500). This time reinstalling Parsoid did not fix the problem, for some reason. Ganomix (talk) 09:24, 31 March 2017 (UTC)
- When I type http://localhost:8000/ in my web browser, it shows that Parsoid is running.
- I can also visit e.g. http://localhost:8000/localhost/v3/page/html/Main_Page, and it parses the wiki's main page.
- For some reason, Visual Editor is not loading, though. It just keeps giving me the HTTP 0 or HTTP 500 or curl error 56. Ganomix (talk) 13:03, 31 March 2017 (UTC)
- I managed to resolve this issue. It was apparently caused by RAM memory being full on the machine running Mediawiki and Parsoid server. Ganomix (talk) 09:09, 4 April 2017 (UTC)
- How?
- I have the same problem... 143.107.126.144 (talk) 16:55, 20 February 2018 (UTC)
- Hi,
- I have Installed MediaWiki visual Editor and parsoid,after installation i am getting Error loading data from server: HTTP 0. while clicking on edit and my MediaWiki version is 1.27.
- Thanks in advance. Arshiyakhanam13 (talk) 05:07, 28 March 2018 (UTC)
Error when editing or saving a page (curl error: 56)
When i try to edit or save a page this error shows up:
"(curl error: 56) Failure when receiving data from the peer"
What could it be? 79.13.130.171 (talk) 15:32, 30 March 2017 (UTC)
- I think we would need more information on your particular setup to be able to help. I recall having this issue when I was setting up my (intranet) wiki and attempted to go the HTTPS authenticated route. DHillBCA (talk) 15:37, 3 April 2017 (UTC)
- Any luck solving your problem? I'm struggling to set up a wiki with https and get this error Italicbard (talk) 16:18, 26 April 2017 (UTC)