Extension talk:VisualEditor/2017/09
Add topic| 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.
āļāļēāļĒ āļāļīāđāļāļĐāļāđāđāļŠāļāļāļ§āļĩāļŠāļļāļ
[edit]Dear All:
I already setup VisualEditor successfullyïžand it work when in anonymous users modeãBut when I
add grouppermissionsïž it hide by itselfãeven I add this command:
$ wgDefaultUserOptions ['visualeditor-editor'] =âvisualeditorâ;
Here is my set:
$wgGroupPermissions = array();
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['createaccount'] = true;
$wgGroupPermissions['*']['edit'] = false;
$wgWhitelistRead = array ("Main Page","Special:Userlogin","Wikipedia:Help");
$wgGroupPermissions['user']['autocreateaccount']=false;
$wgGroupPermissions['user']['read'] = true;
$wgGroupPermissions['user']['userrights']=false;
$wgGroupPermissions['user']['edit'] = true;
$wgRemoveGroups['bot'] = true;
$wgRemoveGroups['autoconfirmed'] = true;
$wgGroupPermissions['sysop']['userrights']=false;
$wgGroupPermissions['sysop']['upload']= true;
$wgGroupPermissions['sysop']['reupload']= true;
$wgGroupPermissions['sysop']['reupload-shared']= true;
$wgGroupPermissions['sysop']['edit'] = true;
$wgGroupPermissions['sysop']['import']=true;
$wgGroupPermissions['sysop']['editprotected']=true;
$wgGroupPermissions['sysop']['createpage'] = true;
$wgGroupPermissions['sysop']['move'] = true;
$wgGroupPermissions['sysop']['delete'] = true;
$wgGroupPermissions['bureaucrat']['userrights']=true;
Here is my VisualEditor set:
#$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
$wgHiddenPrefs[] = 'visualeditor-enable';
$wgVirtualRestConfig['modules']['parsoid'] = array(
#// URL to the Parsoid instance
#// Use port 8142 if you use the Debian package
'url' => 'http://10.159.246.222:8000',
#// Parsoid "domain", see below (optional)
'domain' => '10.159.246.222',
#// Parsoid "prefix", see below (optional)
'prefix' => '10.159.246.222'
);
so do i set up wrong command, or If you have solutoin, please help me.
Thanks very much. Wang.carl (talk) 10:26, 2 September 2017 (UTC)
- Parsoid needs an access to the wiki, which was lost when you wrote $wgGroupPermissions['*']['read'] = false. To fix it, you have to forward the cookies as described on Extension:VisualEditor# Forwarding Cookies to Parsoid. ~ Seb35 [^_^] 19:58, 9 October 2017 (UTC)
MW: 1.28.2. VisualEditor+Parsoid, "Unknown Error" when trying to save page through VisualEditor
[edit]I have installed MW:1.28.2 and its compatible VE and Parsoid on my private Wiki. When i am trying to save page with Infobox template , it gives me "Something went wrong" - "Unknown Error". Without Infobox template, this is working fine. There is the only problem article with the Infobox template. Following is the Infobox template which i have pasted in article. Also, I have imported all the related Infobox modules in my private wiki but it does not work properly. I have tried everything to resolve this issue but i still get this error.
Has anyone resolved this before, and any idea on how I can troubleshoot it? Please help. Pankaj9350 (talk) 10:16, 15 September 2017 (UTC)
- Has nobody found a way to solve this? I found posts 4 years old with the same problem. 2001:4641:F835:0:B81E:B622:637F:EA7D (talk) 22:49, 13 January 2019 (UTC)
- Oh my Goodness, got the exact same problem. Hasn't anyone figured out a way to fix this? Feels like i have tried everything now. OleolsenkjhÃļlkÃļlk (talk) 08:37, 16 January 2019 (UTC)
MW 1.28.2/Restbase
[edit]I need help getting my Restbase server set up correctly. Basically I would like to run MW, Parsoid and and a Restbase server all from the same Amazon AWS EC2 instance which is running Ubuntu 14.04 but I'm getting stuck when I try to get a working Restbase server running.
MW works just fine, and I've installed VisualEditor and Parsoid and both are working as well - if I do curl http://localhost:8142 I get the Parsoid welcome page and I don't have any trouble editing existing pages with the VisualEditor which tells me that there is no issue with Parsoid. In my localsettings.php I have these lines to get Parsoid working:
$wgVirtualRestConfig['modules']['parsoid'] = array('url' => 'localhost:8142','domain' => 'localhost');
$wgSessionsInObjectCache = true;
$wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;
After I had all of that working I tried to set up a Restbase server which is where I encountered a ton of trouble. I tried following the directions here: Content translation/cxserver/Setup. (I didn't install cxserver, I just want the restbase server) Here's what I did:
- git clone https://github.com/wikimedia/restbase.git from my user home directory
- npm install from within the cloned restbase folder
- cp config.example.yaml config.yaml from the same folder
- apt-get install libsqlite3-dev as instructed in the config.yaml
- Edited the config.yaml to look like this (note that I used localhost everywhere because everything should be running from the same EC2 instance):
- name: restbase
module: hyperswitch
conf:
port: 7231
salt: secret
default_page_size: 125
user_agent: RESTBase
ui_name: RESTBase
ui_url: https://www.mediawiki.org/wiki/RESTBase
ui_title: RESTBase docs
spec:
x-request-filters:
- path: lib/security_response_header_filter.js
x-sub-request-filters:
- type: default
name: http
options:
allow:
- pattern: http://localhost/api.php
forward_headers: true
- pattern: http://localhost:8142
forward_headers: true
- pattern: /^https?:\/\//
paths:
/{domain:localhost}:
x-modules:
- path: projects/example.yaml
options:
action:
# XXX Check API URL!
apiUriTemplate: http://localhost/api.php
# XXX Check the base RESTBase URI
baseUriTemplate: "{{'http://{domain}:7231/{domain}/v1'}}"
parsoid:
# XXX Check Parsoid URL!
host: http://localhost:8142
table:
backend: sqlite
dbname: db.sqlite3
pool_idle_timeout: 20000
retry_delay: 250
retry_limit: 10
show_sql: false
citoid:
host: http://citoid-beta.wmflabs.org
mathoid:
host: http://mathoid-tester.wmflabs.org
mobileapps:
host: http://appservice.wmflabs.org
purged_cache_control: s-maxage=0, max-age=86400
purged_cache_control_client_cache: s-maxage=0, max-age=300
Then I did 'node server' from within the restbase folder to get a restbase server running - it seems to work with a server listening on port 7231. But this is where things don't work as expected.
- If I do curl http://localhost/Main_Page I get the html code for my main page on the wiki (so far so good)
- If I do curl http://localhost:8142/ I get the html code for the Parsoid welcome page (also good)
- If I do curl http://localhost:7231/localhost/v1/ I get: {"items":["page","transform"]} (not sure if this is the correct output but this must mean a Restbase server is running and listening on port 7231 right?)
- And if I do curl http://localhost:7231/localhost/v1/page/html/Main_Page I get: {"type":"https://mediawiki.org/wiki/HyperSwitch/errors/server_error","title":"Site info fetch failed.","method":"get","detail":"SiteInfo is unavailable for localhost","uri":"/localhost/v1/page/html/Main_Page"} (this is definitely not right)
When I do number 4 above I should get the html from my main page but it is not working. I'm not sure what I'm doing wrong here - can anyone help? Bluehacker007 (talk) 18:32, 16 September 2017 (UTC)
- After 3-4 hours, I successfully made RESTBase working myself. I obtain the same results for 1-3, with the additional step
- 3bis. If you do curl -v -H 'Accept: text/html' 'http://localhost:7231/localhost/v1/' you get the HTML documentation for RESTBase (more easily readable in a browser).
- For 4., you should obtain a HTML5+RDFa version of "Main_Page":
- Did you add in your LocalSettings.php the following parameters?
$wgVirtualRestConfig['modules']['restbase'] = ['url' => 'http://localhost:7231','domain' => 'localhost','parsoidCompat' => false];$wgVisualEditorFullRestbaseURL = 'http://localhost:7231/localhost/';- Also, there is a task about private wikis phab:T88016, possibly RESTBase donât work in this configuration (I didnât read in details this task, only saw there was a proposed patch submitted then reverted and another abandoned). ~ Seb35 [^_^] 18:34, 15 October 2017 (UTC)