Jump to content

Topic on Talk:VisualEditor

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"