Talk:VisualEditor

Jump to navigation Jump to search

About this board

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

When other extension uses curl_exec, visualeditor throws "Unknown error" when editing article

2
Kulttuuri (talkcontribs)

Using MediaWiki 1.29.1. I am using extension SlackNotifications. When editing an article, the extension SlackNotifications in the end runs curl_exec($curl_h) which then throws "Unknown error" on VisualEditor's UI. After commenting out the curl_exec($curl_h) in SlackNotifications extension, VisualEditor works fine.


Are there known issues when other extension uses curl and VisualEditor? This is the full code that SlackNotifications extension uses for full curl init and send:

$curl_h = curl_init();

curl_setopt($curl_h, CURLOPT_URL, $wgSlackIncomingWebhookUrl);

curl_setopt($curl_h, CURLOPT_POST, 1);

curl_setopt($curl_h, CURLOPT_POSTFIELDS, $post);

// I know this shouldn't be done, but because it wouldn't otherwise work because of SSL...

curl_setopt ($curl_h, CURLOPT_SSL_VERIFYHOST, 0);

curl_setopt ($curl_h, CURLOPT_SSL_VERIFYPEER, 0);

// Set proxy for the request if user had proxy URL set

if ($wgHTTPProxy) {

curl_setopt($curl_h, CURLOPT_PROXY, $wgHTTPProxy);

curl_setopt($curl_h, CURLOPT_RETURNTRANSFER, true);

}

// ... Aaand execute the curl script!

curl_exec($curl_h);

curl_close($curl_h);

Oleolsenkjhølkølk (talkcontribs)

I have the same issue with visualeditor giving an "unknown error" when saving edits, although the edits still get saved.

My mediawiki version is 1.29+

php 5.5


I am not using the extension slacknotification, but i do have the Echo extension installed, which i assume works in a similar way by providing notifications.

I found another post mentioning cURL needs to be installed, and got it enabled a half hour ago, although my problem still persists so i suspect i might need to do something more than just having the php extension cURL installed.


I am wondering if the "heroku fix" for parsoid might be contributing to the problem?

The solution for users on shared hosting, where you run parsoid from a heroku account.

Reply to "When other extension uses curl_exec, visualeditor throws "Unknown error" when editing article"
217.12.16.56 (talkcontribs)
217.12.16.56 (talkcontribs)

I still have the trouble , you can see in the link, any help?, thansk.

Whatamidoing (WMF) (talkcontribs)

Are you running "matching" versions of MediaWiki, VisualEditor, and Parsoid? Your note on Stack Overflow said that you're running MediaWiki 1.26.2 but did not (AFAICS) mention the version numbers for the extensions.

217.12.16.56 (talkcontribs)
217.12.16.56 (talkcontribs)

I'm thinking I am not using the correct version of parsoid, nodejs and VisualEditor with work right all together with de mediawiki 1.27.0 version.

Any help?, thank you very much

217.12.16.56 (talkcontribs)

I would apreciate if any body can give me the links and the correct protocol to dwonload and install the correct version of parsoid, nodejs and VisualEditor for mediawiki 1.27.0, thanks in advanced.

Whatamidoing (WMF) (talkcontribs)

I don't know how to install the software myself. If we're lucky, someone else will be able to help us.

Whatamidoing (WMF) (talkcontribs)
217.12.16.56 (talkcontribs)
217.12.16.56 (talkcontribs)

I'm afraid this wiki documentation or wiki does not show the correct protocol to install the visual editor, I've spent a lot of time trying without result, I'm thinking about change the product for a wiki, does not give me the correspondent support or help.

the documentation of this wiki is so rolled that is imposible to configure this extension, is not clear at all, apart of that I think there woul be a wiki page describing the complete protocol to install the 3 products , nodejs with the correct version of each SO, the correct version of parsoid for each SO and nodejs and mediawiki, and finally the correct version os visual Editor Extension.

Whatamidoing (WMF) (talkcontribs)

I'm sorry that it's so frustrating. As I said, I don't know how to do it myself. The WMF can't provide support to other people's wikis. Perhaps it'd be possible to find a consultant, or advice from a user group?

201.230.117.133 (talkcontribs)

What we need is a step by step install Wiki+VisualEditor/Parsoid for CentOS7 and Ubuntu. I am too spending a LOT of time trying to get it to work.

Nowhere does it say how and where to download the appropriate versions of MediaWiki/Parsoid (how is the pairing working, any list of versions that work?)

Whatamidoing (WMF) (talkcontribs)

If you figure it out, then please feel free to start a doc page here.

I've heard that the versions of MediaWiki, VisualEditor, and Parsoid must all match (so if you do 1.27 for one, then you have to do 1.27 for all three of them).

Richbodo2 (talkcontribs)

I realize this is an ancient thread, but FWIW, having just installed mediawiki (about an hour including server setup, config, security, etc.) and parsoid (about a week and still slews of errors), for the record it's still non-trivial and I think anyone who can offer consulting services to people trying to set this up would make a mint.


Could be wrong, but it seems that in it's current state, Parsoid/VisualEditor setup really changes the equation as to which wiki people will use drastically and unexpectedly.

Reply to "Can't run VisualEditor y my wiki"

VisualEditor Stuck: Cannot read property 'toText' of null

1
Fatihbahceci (talkcontribs)

Here is code which stucked

ve.dm.MWInternalLinkAnnotation.static.dataElementFromTitle=

function(title,rawTitle){

var element,target=title.toText(),

namespaceIds=mw.config.get('wgNamespaceIds');


Here is console error


load.php?debug=false…ersion=1c9irsr:1892 Uncaught TypeError: Cannot read property 'toText' of null at Object.mw.loader.implement.ve.dm.MWInternalLinkAnnotation.static.dataElementFromTitle (load.php?debug=false…ersion=1c9irsr:1892) at Object.mw.loader.implement.ve.dm.MWInternalLinkAnnotation.static.newFromTitle (load.php?debug=false…ersion=1c9irsr:1893) at Object.ve.ui.MWLinkAction.static.getLinkAnnotation (load.php?debug=false…ersion=1c9irsr:1734) at Object.mw.loader.implement.ve.dm.MWExternalLinkAnnotation.static.toDataElement (load.php?debug=false…ersion=1c9irsr:1890) at VeDmConverter.ve.dm.Converter.createDataElements (load.php?debug=false…version=1c9irsr:965) at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (load.php?debug=false…version=1c9irsr:971) at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (load.php?debug=false…version=1c9irsr:974) at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (load.php?debug=false…version=1c9irsr:974) at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (load.php?debug=false…version=1c9irsr:974) at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (load.php?debug=false…version=1c9irsr:974)

mw.loader.implement.ve.dm.MWInternalLinkAnnotation.static.dataElementFromTitle @ load.php?debug=false…ersion=1c9irsr:1892
mw.loader.implement.ve.dm.MWInternalLinkAnnotation.static.newFromTitle @ load.php?debug=false…ersion=1c9irsr:1893
ve.ui.MWLinkAction.static.getLinkAnnotation @ load.php?debug=false…ersion=1c9irsr:1734
mw.loader.implement.ve.dm.MWExternalLinkAnnotation.static.toDataElement @ load.php?debug=false…ersion=1c9irsr:1890


Reply to "VisualEditor Stuck: Cannot read property 'toText' of null"
Marlonke (talkcontribs)

I've followed the instructions as posted on VisualEditor/Skin requirement both the current version and the ones in the history tab. After adding the three div's with their IDs to my skin, the problem persists; nothing happens when I either call the page with the ?veaction=edit parameter, or when I create a button doing essentially the same. The only clue I have is the class 've-not-available' being added to the page after it's loaded.


The VisualEditor works fine on the stock skins I have: Vector and Chameleon.


I'm using the following versions:

VisualEditor 0.1.0 (9da5996) 16 aug 2016 15:40

MediaWiki 1.27.1 (a52d35d)


My HTML structure looks as followed (note the added mw-content-text and content divs)


<div class="grid-x  grid-margin-x">

               <div id="content">

                   <div class="cell">

                       <div  class="contentbody" >

                           <div id="mw-content-text">

                           <?php

                           if( !$this->atHome) {

                               // do not display the HTML tag if the header is empty

                                   if ( $this->skinData->data['title'] != '' ) {

                                       echo '<h1 id="emmskin-pageheader" class="page-title">';

                                       $this->skinData->html( 'title' );

                                       echo '</h1>';

                                   }

                               }

                               //output the post-processed bodytext

                               echo $this->bodyTextHTML;

                           ?>

                           </div>

                       </div>

                   </div>

               </div>

           </div>


I've tried the following:

- Followed the instructions from the history pages of the Skin Requirements page, in which different names are used for the required divs

- Looking in the support section for someone with a similar problem

- Using the Vector/Chameleon skin HTML structure as inspiration, and trying to make everything in my skin look as close as possible.


I'm guessing this issue has something to do with either faulty configuration, or something lacking in my skin. I've found no clear way of debugging this so everything else I tried is largely trial-and-error to no avail.

Marlonke (talkcontribs)

It was indeed faulty configuration. Through debugging (breaklining some of the VE scripts) I managed to find out that the custom skin wasn't seen by VE as a 'supported skin'. I remedied this by adding '$wgVisualEditorSupportedSkins ['mySkin'];' to LocalSettings.php

Reply to "VE doesn't load on custom skin"
Hoefsldyla (talkcontribs)

Is there any way to stop VisualEditor from automatically adding the <nowiki> tags. For example if I want to type <div> Something </div> it changes it to <nowiki><div></nowiki>Something <nowiki></div></nowiki>

Jdforrester (WMF) (talkcontribs)

No. VisualEditor is a visual editor and is not appropriate for manually inserting raw HTML. For that, use the wikitext editing mode.

Reply to "Stop VE adding <nowiki> tags"
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 :-)

Ti infotrad (talkcontribs)
Reply to "Timeout in VisualEditor"

Is there anyway to make the "Add Templates" feature use "subst:"?

2
Summary by 197.218.86.146
Hoefsldyla (talkcontribs)

I am aware you can use `subst:Template` when searching and it will substitute. My problem is that I want TemplateData to still be able to function.

Hoefsldyla (talkcontribs)

To try get around this i created a template called "Template:Subst:TemplateName" which should work however the Template inserter upon clicking "Insert" just loads forever and never insert anything and you are not able to cancel

Reply to "Is there anyway to make the "Add Templates" feature use "subst:"?"

Enabling VE in Category Page? And enable VE always.

9
AmazingTrans (talkcontribs)

I'm wondering

  1. when i go to a category page, how can i enable visualeditor in that page?
  2. when i search for a page that doesn't exist, Create the page "Test" on this wiki! See also the search results found. By clicking the Test word, it always automatically select Create Source. Is there anyway I can have it select Visual Editor first?
AmazingTrans (talkcontribs)

I have tried the following, and the category doesn't seem to have VE Edit available, only sourceedit. I notice the NS_USER is not necessary, somehow VE is always shown there.

$wgVisualEditorNamespaces[] = array_merge($wgContentNamespaces,array( NS_USER, NS_CATEGORY));

I also tried this, and it didn't work.

$wgVisualEditorNamespaces[] = NS_CATEGORY;
Elitre (WMF) (talkcontribs)
AmazingTrans (talkcontribs)

VE is already working in Main namespace. Just not working in Talk, and Category namespace.

This is on my private wiki.

Whatamidoing (WMF) (talkcontribs)

I believe that the single edit tab feature will solve #2.

84.74.153.35 (talkcontribs)

Since I've updated to MediaWiki 1.26.2 and the latest VisualEditor I also cannot enable VisualEditor for category pages. Before the Update (1.25.3) I could edit category pages.

92.110.165.206 (talkcontribs)

I have the same issue. I would like to enable VisualEditor for Category pages. Also running 1.26.2.

Has anyone managed to enable this yet?

92.110.165.206 (talkcontribs)

Add this to your LocalSettings.php

// Enable VisualEditor in Category Page

$wgVisualEditorAvailableNamespaces = array(

NS_CATEGORY =>true

);
103.255.6.106 (talkcontribs)

It can easily be done if you are using custom fields like pods etc. Just extend the current category and add visual editor as field

Reply to "Enabling VE in Category Page? And enable VE always."

VE has problems with editing <ref name="XYZ" /> link

2
Der Keks (talkcontribs)
Der Keks (talkcontribs)
Reply to "VE has problems with editing <ref name="XYZ" /> link"

Visual Editor does not seem to be compatible with drag and drop or copy and pasting images?

1
Thedonquixotic (talkcontribs)
Reply to "Visual Editor does not seem to be compatible with drag and drop or copy and pasting images?"