Extension talk:SlackNotifications

About this board

Breaks Visual Editor

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)


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. (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. (talkcontribs)

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

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

Reply to "Breaks Visual Editor"

Mediawiki 1.37 support?

Djkcel (talkcontribs)

Do you guys know if this works with Mediawiki 1.37. I tried installing and got the following error:

Fatal error: Uncaught Exception: Unable to open file /var/www/html/wiki/extensions/SlackNotifications/extension.json: filemtime(): stat failed for /var/www/html/wiki/extensions/SlackNotifications/extension.json in /var/www/html/wiki/includes/registration/ExtensionRegistry.php:174 Stack trace: #0 /var/www/html/wiki/includes/GlobalFunctions.php(52): ExtensionRegistry->queue() #1 /var/www/html/wiki/LocalSettings.php(221): wfLoadExtension() #2 /var/www/html/wiki/includes/Setup.php(145): require_once('/var/www/html/w...') #3 /var/www/html/wiki/includes/WebStart.php(90): require_once('/var/www/html/w...') #4 /var/www/html/wiki/index.php(44): require('/var/www/html/w...') #5 {main} thrown in /var/www/html/wiki/includes/registration/ExtensionRegistry.php on line 174

Djkcel (talkcontribs)

I am using PHP 7.4 if that helps.

Kulttuuri (talkcontribs)
Djkcel (talkcontribs)
Reply to "Mediawiki 1.37 support?"
Realsalt (talkcontribs)

MediaWiki 1.35 (and possibly earlier) throws a debug warning when using the "RequireOnce" load method (i.e. require_once("$IP/extensions/SlackNotifications/SlackNotifications.php")

ReadMe and page should be modified to use wfLoadExtension( 'SlackNotifications' ) instead

Reply to "Depricated load"

Addition of whitelist

Mdmallardi (talkcontribs)
Kulttuuri (talkcontribs)

Thanks man, added PR to extension! :)

Reply to "Addition of whitelist"
There are no older topics