Talk:VisualEditor

Jump to: navigation, search

About this board

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

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

Unable to stop the editor from loading while offline

4
Summary by 197.218.90.108
Kaartic (talkcontribs)

Once when I loaded a page while I'm online an went offline to read the page, I accidentally hit the 'Edit' button. This started the progress bar for the editor and obviously it got stuck after sometime as it was unable to connect to the network. It was frustrating for me as I couldn't cancel the page load and thus couldn't read the article that I loaded until I got the error dialog.

It would be nice if there was a way to stop the editor from loading while it's being loaded. This would help the readers to proceed with what they were reading quickly when they accidentally hit the 'Edit' button instead of waiting for the editor to load and then cancel the edit operation.

Note: This a copy of a similar topic at the Visual Wikitext editor.

Elitre (WMF) (talkcontribs)

Isn't "Back" (or its equivalent on mobile) that button? Doesn't the requested article stay in cache, so you don't need to reconnect to read it?

Kaartic (talkcontribs)

I'm not sure what you mean by a "Back" button but I don't see any while the visual editor is loading. Here's a screen shot,

Screen shot of visual editor; loading

In case you are referring to the browser's back button, it had no effect on the loading of the visual editor (possibly due to the caching!). IOW, hitting the "Back" button on the browser and hitting "Forward" button didn't cancel the loading of the visual editor.

197.218.90.108 (talkcontribs)

If you're online pressing ESC (or the equivalent in your operating system /platform) will cancel the loading. If you're offline, allowing it to pseudo-load, then pressing retry and then ESC multiple times seems to also cancel the loading.

Also this isn't specific to visualeditor. All other editors behave in a similar fashion, in fact they show the offline message even faster. One problem is that VisualEditor re-uses the same page, so after it loads if one tries to go back, they hit the same "page" or editor again.

Detecting offline mode is a very tricky thing. There might be temporary network lapses or someone might be using a local proxy that contains a cache of the page, or one of a million other possibilities when it comes to networks.

Chrome had (or has?) to have a more aggressive caching configuration option that could be activated and would store such older pages. Generally speaking though, if one wants to see stuff offline, then saving the page is the best option, even if offline it can retrieve it from the cache and create a copy.

Reply to "Unable to stop the editor from loading while offline"

VE can't load with http 500 error in Browser

2
218.75.121.246 (talkcontribs)

mediawiki version: 1.28.0

nodejs version : v0.10.25

parsoid version i don't know, i have install it with Parsoid/Setup help. and it's work. I can access the http://myhost:8142 and get the right page in Browser.

The question is when i add "wfLoadExtension( 'VisualEditor' );" in LocalSettings.php, i will receive the http 500 error when i access my wiki in browser. when i comment "wfLoadExtension( 'VisualEditor' );" in LocalSettings.php, i can access my wiki normally.

I don't know where configuration is wrong, i'm following the step with Extension:VisualEditor.

I'm sure i have input "git submodule update --init" after clone VE.

Below is LocalSettings.php additional configuration:

# End of automatically generated settings.

# Add more configuration options below.

wfLoadExtension( 'VisualEditor' );

// Enable by default for everybody

$wgDefaultUserOptions['visualeditor-enable'] = 1;

// Optional: Set VisualEditor as the default for anonymous users

// otherwise they will have to switch to VE

// $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";

// Don't allow users to disable it

$wgHiddenPrefs[] = 'visualeditor-enable';

// OPTIONAL: Enable VisualEditor's experimental code features

#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;

$wgVisualEditorAvailableNamespaces = [

"0" => true,

"2" => true,

"102" => true,

"_merge_strategy" => "array_plus"

];

$wgVirtualRestConfig['modules']['parsoid'] = array(

// URL to the Parsoid instance

// Use port 8142 if you use the Debian package

'url' => 'http://localhost:8142',

// Parsoid "domain", see below (optional)

'domain' => 'localhost'

// Parsoid "prefix", see below (optional)

#'prefix' => 'localhost'

);

Below is parsoid partial configuration:(i'm using config.yaml as configuration file)

services:

- module: ../src/lib/index.js

entrypoint: apiServiceWorker

conf:

# For backwards compatibility, and to continue to support non-static

# configs for the time being, optionally provide a path to a

# localsettings.js file.  See localsettings.example.js

#localsettings: ./localsettings.js

# Set your own user-agent string

# Otherwise, defaults to:

#   'Parsoid/<current-version-defined-in-package.json>'

#userAgent: 'My-User-Agent-String'

# Configure Parsoid to point to your MediaWiki instances.

mwApis:

- # This is the only required parameter,

# the URL of you MediaWiki API endpoint.

uri: 'http://localhost/wiki/api.php'

# The "domain" is used for communication with Visual Editor

# and RESTBase.  It defaults to the hostname portion of

# the `uri` property below, but you can manually set it

# to an arbitrary string.

domain: 'localhost'  # optional

# To specify a proxy (or proxy headers) specific to this prefix

# (which overrides defaultAPIProxyURI). Alternatively, set `proxy`

# to `null` to override and force no proxying when a default proxy

# has been set.

#proxy:

#    uri: 'http://my.proxy:1234/'

#    headers:  # optional

thanks.

180.163.179.236 (talkcontribs)

Do you install Restbase service

Reply to "VE can't load with http 500 error in Browser"

Display name function does not show any effect

4
Lanthanis (talkcontribs)

MW 1.27

VE 0.1.0

Hi @Whatamidoing (WMF)

if I want to set a display name for an article or a category it does not show any effect. Furthermore I didn't find any references of this function in the manual.

I think the function should display "VisualEditor" instead of the standard "Category:VisualEditor" for example, right ?

Whatamidoing (WMF) (talkcontribs)

Are you talking about {{DISPLAYTITLE}}? It's used to change the formatting of page titles, such as adding italics to the title of the book at https://en.wikipedia.org/wiki/Pride_and_Prejudice

Lanthanis (talkcontribs)

I'm talking about this function "Anzeigetitel"

Whatamidoing (WMF) (talkcontribs)

The current version is 1.30.0-wmf.10 (cf8ce2d) for MediaWiki and 0.1.0 (c2dab36) for VisualEditor. It looks like you're running an older version. I believe that this problem will be solved if you upgrade to any newer version (anything in the last six months).

Reply to "Display name function does not show any effect"
217.86.209.28 (talkcontribs)

Hi all,

When I open Media settings (Insert -> Media) and type in "L" it says nothing found. If I type in "L3" it shows the correct PDF file. Is there a way to convince the wiki to list all the media starting with letter [a-z] or show all the available media? Because not every user knows exactly what he has to search for.

If I test with other Picture Database ($wgUseInstantCommons = true;) it works with only typing in one letter.

MediaWiki Version: 1.28.0

Whatamidoing (WMF) (talkcontribs)

Well, that works on this wiki (after a delay). What happens in the regular Special:Search box, if you type in File:L? Does it list the files that you expect?

Lanthanis (talkcontribs)

If you are not using CirrusSearch or another fulltext search engine, you have to use search parameter like "L3" or ~L

Reply to "Media settings search is incomplete"
217.86.209.28 (talkcontribs)

Hi, we have one very huge Page in one of our customers mediawiki. Editing this page will cause an alert windows after about 30 seconds witch says: "http". Not more. The Parsoid log says: ...started parsing... and then ...completed parsing in 37661 ms... so im guessing on a timeout problem. All other Pages load fast and fine. Is there a way to increase timeout? Thank you for every help and hint :-)

Reply to "Timeout in VisualEditor"

Parsoid crashes when processing articles with codeblocks

7
Summary by SSastry (WMF)
Satttarov (talkcontribs)

Hello, folks! When I create an article in our private wiki with more then four codeblocks, save it and try to edit later, those codeblocks aren't appear in editor. And when I close the editor, page freezes for about a minute then pass. But if I try to launch editor on this page again it crashes with error "HTTP 0" on parsoid logs I see this:

[warning][testwiki/Тестовая_страница] non-200 response: 504 <html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.6.2</center>
</body>
</html>
[error][testwiki/Тестовая_страница] Batch request failure for "f1c423e85011b3500256b9b5e736d7a0": 504
Error: Batch request failure for "f1c423e85011b3500256b9b5e736d7a0": 504
at BatchRequest.ApiRequest._requestCB (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:421:11)
at Request.self.callback (/usr/lib/parsoid/node_modules/request/request.js:198:22)
at Request.emit (events.js:98:17)
at Request.<anonymous> (/usr/lib/parsoid/node_modules/request/request.js:1063:14)
at Request.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/usr/lib/parsoid/node_modules/request/request.js:1009:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:929:16
at process._tickCallback (node.js:419:13)
[warning][testwiki/Тестовая_страница] non-200 response: 504 <html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.6.2</center>
</body>
</html>

Somebody encountered the same problem? Please help, this error completely defeats the purpose of our wiki.

Whatamidoing (WMF) (talkcontribs)

@SSastry (WMF), have you seen anything like this before?

SSastry (WMF) (talkcontribs)

I haven't seen this before ... but, can you paste the contents of that page for us to inspect? Looks like mediawiki is not able to provide information back to Parsoid ... either it is taking too long and timing out, or there is some other error that is causing this on the mediawiki end.

Satttarov (talkcontribs)

For the sake of testing I'm using these blocks. It doesn't matter what those blocks contain, if there is more than four blocks, Parsoid hangs as I described before.

<syntaxhighlight lang="bash">

test

</syntaxhighlight>

Thanks in advance.

Arlolra (talkcontribs)

At first glance, that looks like a deadlock.

Do things get worse when you remove batching?

parsoidConfig.useBatchAPI = false;

Is this specific to the syntaxhighlight extension? What if you tried with <source>?

Arlolra (talkcontribs)

Sorry, <source> wasn't a good test case. I wanted an extension tag not provided by the same extension. Try <gallery>.

Arlolra (talkcontribs)

This is being fixed in https://phabricator.wikimedia.org/T151130

Jeblad (talkcontribs)

There should be a VisualEditor/Recipes where some common problems and solutions are described step by step. The page as it is now is just an example, with a single entry. Feel free to move the page if it is better suited on other locations.

Some additional background on Import of preformatted templates into an article.

Reply to "Receipes"

Images (edit-mode) not shown with https-wiki

1
Summary by Waanders
Waanders (talkcontribs)

Hi all,

We've a problem when using the Visual Editor with a https-protected wiki (MW version 1.27.1): images in a wikipage aren't displayed when editing a page where this does happen in Read mode.

View source of the page contains:

<a href="/wiki/index.php/File:MyImage.jpg" class="image"><img alt="MyImage.jpg" src="/images/5/5a/MyImage.jpg" width="208" height="199" />

Console of the browser gives this error message: "GET https://localhost/images/5/5a/MyImage.jpg net::ERR_CONNECTION_REFUSED".

How can I fix this problem?

Regards, Jethro

VE is garbling wikilinks as an drive-by-accident

2
Sänger (talkcontribs)

In this change it seems, the VE has changed some correct wikilinks to something not readable in normal edit mode. The IP probably only wanted to update the table (and messed it up, despite VE is supposed to be better in working with tables), it would never have made those other changes intentionally. As I can't start a phab, I report it here.

The paragraph on deWP where this popped up was this one.

Grüße vom Sänger ♫(Reden) 16:39, 9 January 2017 (UTC)

Sänger (talkcontribs)

Another Post in deWP where it popped up. Is there already a phab for this? Grüße vom Sänger ♫(Reden) 09:34, 26 March 2017 (UTC)

Reply to "VE is garbling wikilinks as an drive-by-accident"
Blazyb (talkcontribs)

I have a page on 9738 words and 73074 characters.

VE loads to 100% (pretty quickly) and stops there and nothing happens.

When I trimmed it down to around 50k characters it worked.

Sounds like there is a limitation somewhere that restricts this?

Any ideas?

Blazyb (talkcontribs)

Problem identified: It was a thumbnail that VisualEditor cannot parse. Why is that?

Blazyb (talkcontribs)

Error msg: https://gyazo.com/ea686db5756acd54aa5d2677c431317c

Whatamidoing (WMF) (talkcontribs)

Hi @Blazyb. Is this on a private wiki? Is the image present on the local wiki, or pulled from somewhere else?

Blazyb (talkcontribs)

Yes, this is a private wiki. The image is present on the local wiki yes, it is uploaded through the "Upload file" page. And checking the images folder I can see the files there.

77.59.199.130 (talkcontribs)

Hey Blazyb did you found a solution?

My VE is loading as well but stops at 100%.. But only in Pages with Images

Maalab (talkcontribs)

I got the same error. Anyone have a solution?

Thanks!

Maalab (talkcontribs)

I have discovered something. Our Wiki is in french. If i put this in my LocalSettings.php, it work : $wgLanguageCode = "en";

I have not find a solution to use it in french.

Whatamidoing (WMF) (talkcontribs)

Maalab, can you please tell me more about your config? Also, what version are you using for VisualEditor, Parsoid, and MediaWiki?

I've named you in the bug report at Phab:T155447. You can provide more information on this page or directly in the Phabricator task.

Maalab (talkcontribs)

Thanks Whatamidoing for your reply. I will reply to both place so people can follow this case.

Our wiki is run on Ubuntu 14.04.5 LTS server. Parsoid version is 0.6.1, Mediawiki version is 1.27.1 LTS and VisualEditor version is 0.1.0.

This is a private Wiki, but i have change it to a public Wiki and the problem is still there.

We have some extensions, but i will not list them (except if you need it), because when i disable them all, this does not solve the problem.

I don't think the problem is related to parsoid, because, when i troubleshoot parsoid and show the page in problem (http://servername:8142/localhost/v3/page/html/Test/), everithing seems to work fine and there is no error un parsoid log.

The only way i get VisualEditor to work with a page that have an image aligment, is when i put the Wiki in english. Our Wiki is in french.

When i inspect the code with Chrome Debugger, i get this error : Uncaught TypeError: Cannot read property 'constructor' of null at Object.oo.cloneObject.

I have also report this bug at https://phabricator.wikimedia.org/T123471.

Let me know if i can test something to help troubleshoot.

TitusiMW (talkcontribs)

@Maalab: how do you change public wiki to private wiki? I can only think of two ways --- going through installation process all over again or changing tons of permission variables one-by-one? Even there, I did not find any complete/exhaustive lists of permission variables that need to be set to flip a private wiki to public wiki and vice-versa.

Maalab (talkcontribs)

Maybe i am wrong about what is a private wiki, but for me, a private wiki is a wiki that require authentication to see pages. What we do to make a private wiki is remove permission to read ans edit page to all user and give those permission to know user :

$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['*']['read']          = false;

$wgGroupPermissions['*']['edit']          = false;

$wgGroupPermissions['*']['createpage']    = false;

$wgGroupPermissions['*']['createtalk']    = false;

$wgGroupPermissions['*']['writeapi']      = false;

$wgGroupPermissions['user']['edit'] = true;

$wgGroupPermissions['user']['createpage'] = true;

$wgGroupPermissions['user']['createtalk'] = true;

If i remove those line in my LocalSettings file, it is a public wiki and anyone can read or edit pages.

But like i said, maybe i am wrong about what is a private wiki.

Maalab (talkcontribs)

My problem have been solved. See https://phabricator.wikimedia.org/T123471

Reply to "VE not loading big pages"