Jump to content

Extension talk:VisualEditor/2017/10

Add topic
From mediawiki.org

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.

Extension Conflict

[edit]

It appears that any page that has <spoiler> tags as provided by the Extension:Spoilers , VisualEditor fails and delivers an error 403. Any tips on resolving this or is this a known issue? TorontonianOnlines (talk) 21:20, 10 October 2017 (UTC)Reply

I haven't heard of that problem before, so I've filed a Phab task. Whatamidoing (WMF) (talk) 17:26, 12 October 2017 (UTC)Reply

private wiki session expires on Chrome but not IE

[edit]

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.


Hello.. I have a RHEL7 server in an enterprise environment that enforces authenticated browser sessions from all clients visiting my MW 1.28.2 application. I have installed a parsoid server on same application server as well (localhost) and have installed the "VisualEditor" and "Auth_remoteuser" extensions as follows:
# ---------------------------------------------------------------------------------------
# --- Authentication --- START ----------------------------------------------------------
# ---------------------------------------------------------------------------------------
# --- trust that server security agent forced session header to have authorized user info
# --- and auto-login users based on session header attributes
# ---------------------------------------------------------------------------------------
$HTTP_MyCompanyUID = "";
$HTTP_MyCompanyEMAIL = "";
$HTTP_MyCompanyCN = "";

if(isset($_SERVER['HTTP_MyCompanyUID'])){$HTTP_MyCompanyUID=$_SERVER['HTTP_MyCompanyUID'];}
if(isset($_SERVER['HTTP_MyCompanyEMAIL'])){$HTTP_MyCompanyEMAIL=$_SERVER['HTTP_MyCompanyEMAIL'];}
if(isset($_SERVER['HTTP_MyCompanyCN'])){$HTTP_MyCompanyCN=$_SERVER['HTTP_MyCompanyCN'];}

wfLoadExtension('Auth_remoteuser');
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['autocreateaccount'] = true;
$wgAuthRemoteuserUserName = $HTTP_MyCompanyUID;
$wgAuthRemoteuserUserPrefsForced = [
    'email'    => $HTTP_MyCompanyEMAIL,
    'realname' => $HTTP_MyCompanyCN
];
# ---------------------------------------------------------------------------------------
# --- Authentication --- STOP -----------------------------------------------------------
# ---------------------------------------------------------------------------------------

# ---------------------------------------------------------------------------------------
# --- Visual Editor --- START -----------------------------------------------------------
# ---------------------------------------------------------------------------------------
if ( $_SERVER['REMOTE_ADDR'] == 'myIPaddress' ) {
 $wgGroupPermissions['*']['read'] = true;
 $wgGroupPermissions['*']['edit'] = true;
}
wfLoadExtension( 'VisualEditor' );
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
$wgHiddenPrefs[] = 'visualeditor-enable';
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
$wgVirtualRestConfig['modules']['parsoid'] = array(
	'url' => 'http://localhost:8000',
	'domain' => 'localhost',
	'prefix' => 'localhost'
);
$wgVisualEditorAvailableNamespaces = [
    NS_MAIN  => true,
    NS_USER  => true,
    "_merge_strategy" => "array_plus"
];
$wgSessionsInObjectCache = true;
$wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;
# ---------------------------------------------------------------------------------------
# --- Visual Editor --- STOP ------------------------------------------------------------
# ---------------------------------------------------------------------------------------

The "Auth_remote user" works well for both IE and Chrome

In IE - VisualEditor works fine and the edits are shown as made by the user...

In Chrome - VisualEditor works fine up until I try to save the changes, at which point it states that the session has become invalid and the user is no longer known. In my tinkering with it, I have set $wgEmailAuthentication = false; and $wgEmailConfirmToEdit = false; and when I do this I am able to save the edits in Chrome although the edits are logged as anonymous at the user's IP address.

Clearly the problem is that the session header is not being acknowledeg via Chrome where it is with IE.

So maybe this isn't a Parsoid/VisualEditor issue but I think this is still the place to seek help.

Does anyone know what could cause this browser based difference in the way session headers are handled by parsoid/VisualEditor?

thanks (in advance),

-Rich Revansx (talk) 14:20, 12 October 2017 (UTC)Reply

I solved my problem... when I first started trying o get VisualEditor running in my private wiki environment, I asked my security folks to turn off the security agent for the API.php page - thinking that that was necessary for the parsoid server.. this was before I knew about the the "REMOTE ADDR " trick below:
if ( $_SERVER['REMOTE_ADDR'] == 'myServersIPaddress' ) {
if ( $_SERVER['REMOTE_ADDR'] == 'myIPaddress' ) {
 $wgGroupPermissions['*']['read'] = true;
 $wgGroupPermissions['*']['edit'] = true;
}
Once I was using the REMOTE ADDR trick, it turns out that having the the API unauthenticated created a problem that manifest itself in different ways depending on the browser.
Lesson Learned. Hope this helps someone somewhere someday. Cheers!
-Rich Revansx (talk) 16:03, 13 October 2017 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

414 Request-URI Too Large NGINX

[edit]

Is the visualeditor incresing the URL ??? I have a mediawiki ( 30000 records, working by three years) and know , out of blue, starting to show this message in visualeditar. (Common editor is ok!).

This happened with somenone? Is The URL javascript generated in VisualEditor increasing ? Orthophilos (talk) 17:44, 26 October 2017 (UTC)Reply

Have the same issue with apache, It seems for whatever reason VisualEditor is sending the wikitext as encoded GET Parameter..
"GET /api.php?action=visualeditor&format=json&paction=parsefragment&page=Büro&wikitext=FULLWIKITEXT" 92.60.7.130 (talk) 09:24, 22 February 2018 (UTC)Reply

[GlobalTitleFail] MessageCache::parse called by VisualEditorDataModule ... ->parse with no title set.

[edit]

I can't get the visual editor showing up. I'm trying to get it working on one wiki on my multi-wiki farm.

(Ubuntu 16.04; Mediawiki 1.27, from repo; VisualEditor 0.1.0, downloaded from here yesterday; Parsoid 0.8.0all, from the repo)

I have Parsoid installed and working, in that it returns page contents when called form Curl.

My LocalSettings.php contains this:

wfLoadExtension( 'VisualEditor' ); 
$wgDefaultUserOptions['visualeditor-enable'] = 1; 
# $wgHiddenPrefs[] = 'visualeditor-enable'; 
$wgVirtualRestConfig['modules']['parsoid'] = array( 
      'url' => 'http://www.mydomain.tld:8142',
      'domain' => 'domain' 
);

$wgDebugLogFile = "/var/log/mediawiki/debug-{$wgDBname}.log";

These settings match those in /etc/mediawiki/parsoid/config.yaml

The visual editor shows as being enabled in the user's Preferences.

When I attempt to edit a page (existing or new) the debug log contains the lines below. It appears to load the VisualEditor assets, then fail with the [GlobalTitleFail] errors.

Anyone have any suggestions?

Thanks!

[resourceloader] Message blob cache-miss for ext.visualEditor.targetLoader 
[resourceloader] Message blob cache-miss for ext.visualEditor.desktopArticleTarget 
[resourceloader] Message blob cache-miss for ext.visualEditor.mobileArticleTarget 
[resourceloader] Message blob cache-miss for ext.visualEditor.mediawiki 
[resourceloader] Failed to find visualeditor-quick-access-characters.json (en) 
[resourceloader] Message blob cache-miss for ext.visualEditor.core 
[resourceloader] Message blob cache-miss for ext.visualEditor.core.mobile 
[resourceloader] Message blob cache-miss for ext.visualEditor.switching 
[resourceloader] Message blob cache-miss for ext.visualEditor.mwcore 
[resourceloader] Failed to find captcha-edit (en) 
[resourceloader] Failed to find captcha-label (en) 
[resourceloader] Failed to find fancycaptcha-edit (en) 
[resourceloader] Failed to find fancycaptcha-reload-text (en) 
[resourceloader] Failed to find questycaptcha-edit (en) 
[resourceloader] Message blob cache-miss for ext.visualEditor.mwformatting 
[resourceloader] Message blob cache-miss for ext.visualEditor.mwimage 
[resourceloader] Message blob cache-miss for ext.visualEditor.mwlink 
[resourceloader] Message blob cache-miss for ext.visualEditor.mwmeta 
[resourceloader] Message blob cache-miss for ext.visualEditor.mwtransclusion 
[resourceloader] Message blob cache-miss for ext.visualEditor.language 
[resourceloader] Message blob cache-miss for ext.visualEditor.mwgallery 
[resourceloader] Message blob cache-miss for ext.visualEditor.mwsignature 
[resourceloader] Message blob cache-miss for pdfhandler.messages 
[resourceloader] Message blob cache-miss for mobile.editor.ve 
[GlobalTitleFail] MessageCache::parse called by VisualEditorDataModule->getScript/Message->parse/Message->toString/Message->parseText/MessageCache->parse with no title set. 
[GlobalTitleFail] MessageCache::parse called by VisualEditorDataModule->getScript/Message->parse/Message->toString/Message->parseText/MessageCache->parse with no title set. 
[GlobalTitleFail] MessageCache::parse called by VisualEditorDataModule->getScript/Message->parse/Message->toString/Message->parseText/MessageCache->parse with no title set. 
[GlobalTitleFail] MessageCache::parse called by VisualEditorDataModule->getScript/Message->parse/Message->toString/Message->parseText/MessageCache->parse with no title set. 
[GlobalTitleFail] MessageCache::parse called by VisualEditorDataModule->getScript/Message->parse/Message->toString/Message->parseText/MessageCache->parse with no title set. 
[GlobalTitleFail] MessageCache::parse called by VisualEditorDataModule->getScript/Message->parse/Message->toString/Message->parseText/MessageCache->parse with no title set. 
[GlobalTitleFail] MessageCache::parse called by VisualEditorDataModule->getScript/Message->parse/Message->toString/Message->parseText/MessageCache->parse with no title set. Neilnjae (talk) 20:56, 30 October 2017 (UTC)Reply
This fixed it for me:
  1. Open DevTools in your browser and go to the Console window
  2. Go to a page in your wiki and click Edit to start VisualEditor
  3. Check for any exception related to VisualEditor:
Exception in module-execute in module ext.cite.visualEditor:
...
VisualEditor failed to load: Error: Module ext.cite.visualEditor has failed dependencies
...
If that is the case get the newer version of VisualEditor for your MediaWiki installation (for MediaWiki 1.28 use VisualEditor for 1.27) and replace the existing VisualEditor files in the extension folder. The one from the Extension Distributor worked for me: Special:ExtensionDistributor/VisualEditor J. Xavier Atero 21:51, 6 November 2017 (UTC)