Jump to content

Topic on Extension talk:SlackNotifications

Breaks Visual Editor

19
DustinICW (talkcontribs)

I'm not sure why this happens, but the webhook on this extension causes an unknown error to occur when publishing an edit through the VisualEditor. This is more of a luxury extension for me, so I did not dive into the issue, but thought it was worth mentioning.

Kulttuuri (talkcontribs)

Hi,

Thanks for notifying about this! What mediawiki and VisualEditor version do you have installed? Did you get any errors on your PHP log file? I'll try to reproduce this error in the weekend.

DustinICW (talkcontribs)

I am running Mediawiki Version 1.28.0 and VisualEditor 0.1.0.

This was in the process of migrating to a new install and I did not get any errors in the log file, but if needed, I could recreate the status and change the log level to debug.

I can however tell you that the edit was actually successfully recorded and the error occurred between the clicking "Save Page" and the pop that says your edit was successfully saved.

Let me know if I can help diagnose the problem further.

109.240.52.149 (talkcontribs)

I've pushed update which fixes the extension breaking with deprecated article saved and inserted hooks. It would be highly appreciated if you could pull latest version of the extension code from github and let me know if that fixed it for you :)

DustinICW (talkcontribs)

Unfortunately, it did not fix the issue:( Also, i checked the log files and it is not recording any errors. Here is a screenshot of the error I get.

Kulttuuri (talkcontribs)

OK - Taking a look now.

Kulttuuri (talkcontribs)

Reproduced the problem. The problem with this issue is that is does not generate any log in the php, apache error log files nor chrome console. I couldn't even find that error anywhere in the visualeditor sources directory. I'm adding bug report of this in visualeditor extension talk page as this seems like visualeditor doesn't really work with extensions that also use same hooks that it uses.

Kulttuuri (talkcontribs)

FYI; I did not test this with latest visualeditor master branch to see if this issue was resolved there. Master branch requires MediaWiki > 1.29, I have 1.28 so cannot use that.

This post was hidden by Oleolsenkjhølkølk (history)
Oleolsenkjhølkølk (talkcontribs)

Did anyone find a solution to this? The problem is over 3 years old, and i keep finding people reporting the same problem but no fixes, been trying to find a way to fix it myself, but just cant figure out what exactly is causing the error.

Kulttuuri (talkcontribs)

Hey @Oleolsenkjhølkølk ! I just installed parsoid and visualeditor and found that the problem is that when the extension tried to send slack notification through curl using curl_exec, it causes error in visualeditor. Can you try setting the slack send method to file_get_contents using the $wgSlackSendMethod configuration parameter? That should fix the problem.

Oleolsenkjhølkølk (talkcontribs)

I am not using slacknotification, but i am using the Echo extension for notifications, and i am assuming they work in a similar way?


Edit: I should mention that yes, i am aware that this is the talk page for slack notification, but i am getting a bit desperate, hehe, been struggling with this issue for a while and if anyone else has found a solution to it, they haven't posted it.

Kulttuuri (talkcontribs)
Oleolsenkjhølkølk (talkcontribs)

Seems like it, Echo was working before i got curl activated so i don't think that extension depends on it still, seeing how two different circumstances create the same error, the issue might not be with curl?

Found another, older post with someone reporting the same error, but not using either echo or slacknotification.

Kulttuuri (talkcontribs)

Yep, let's see if we get any response to that new thread from someone in the visual editor team.

Kualalapu (talkcontribs)

Hi @Kulttuuri,

I tried changing $wgSlackSendMethod to file_get_contents as I also got the "unknown error". This solved the problem for me.

Thank you very much!

Kulttuuri (talkcontribs)

Topic started here: Topic:Uv51ift9sepu78in. If you could, it would be fantastic to describe your current environment with the same issue.

213.5.26.14 (talkcontribs)

Have the same problem with my own extention using PageSaveComplete hook. Is there any fix for this problem?

212.12.75.9 (talkcontribs)

Problem was with Curl, not with hooks. Had to use another method to send messages to telegram

Reply to "Breaks Visual Editor"