CanastaWiki / Canasta

MediaWiki Docker image for Canasta, an all-in-one MediaWiki stack for easy deployment and management of enterprise-ready MediaWiki on production environments.
https://www.canasta.wiki
MIT License
36 stars 28 forks source link

Remove (or fix) DiscussionTools extension #137

Closed yaronkoren closed 1 year ago

yaronkoren commented 1 year ago

I finally tried installing DiscussionTools today on a wiki, and it turns out - it doesn't actually work! Or rather, I couldn't get it working. Which isn't totally surprising if you read the talk page, where they state, "the experimental DiscussionTools system isn't really something that is supported for third party use". Though it would have been nice if stated that somewhere on the extension's main page.

I'd be curious if anyone else has tried installing DiscussionTools on a non-Wikimedia wiki, or even seen it in use on such a wiki. I'm guessing the answer is no to both questions.

Given that, and barring anyone's ability to fix this extension for outside use in the near future, I think we should remove this extension from Canasta. Which is quite unfortunate, given how helpful I think it is for managing discussions, when it works.

Thankfully, there is an alternative: the JS script Convenient Discussions, created apparently by one Russian Wikipedia user:

https://commons.wikimedia.org/wiki/User:Jack_who_built_the_house/Convenient_Discussions

I believe it was one of the predecessors to DiscussionTools, and it seems to work surprisingly well - either as a gadget or when directly added to MediaWiki:Common.js, making it the default talk page editing tool. (Or, for that matter, as part of a Page Exchange package.)

So, if we do remove DiscussionTools, I'd recommend at least adding something to the Canasta documentation about Convenient Discussions as an option. But I suppose that's another story.

tosfos commented 1 year ago

Just noting that this was added individually in #46. I assume that means that at some point it worked.

yaronkoren commented 1 year ago

Yeah, it was added later than most of the other extensions, but it was actually part of the spec from the beginning. Which I think was a mistake - again, I'm not aware of a single non-Wikimedia wiki that uses this extension.

yaronkoren commented 1 year ago

I remain convinced that DiscussionTools cannot yet work outside of Wikimedia sites - so unless I hear from someone otherwise, I plan to remove this extension from Canasta at some point.

malberts commented 1 year ago

Do you have an example of what didn't work for you? Completely unrelated to Canasta, I tried using this on 1.39 with a custom skin. The part that kept failing for me was when I tried to reply.

This is what I see on an empty talk page: Screenshot_20221201_211626

When creating the first topic: Screenshot_20221201_210847

Which then makes the talk page look like this: Screenshot_20221201_210918

But when I try to reply it throws an error: Screenshot_20221201_210947

The docs about that error: https://www.mediawiki.org/wiki/Help:DiscussionTools/Why_can%27t_I_reply_to_this_comment%3F#Could_not_find_the_comment_you're_replying_to_on_the_page

If you can still see the comment after refreshing and purging the page, and you still receive this error, it might indicate a bug in Parsoid causing it to render the page differently from the PHP parser (DiscussionTools uses Parsoid internally to add new comments)

The last time I debugged I could see what the problem is, but I don't understand why it's happening. Basically, DiscussionTools is looking for a specific HTML id (IIRC the section heading plus a timestamp), but the ids on my page didn't match what it was looking for. So I suspect it might be Parsoid-related or some other config I have which is unclear to me. It's definitely not the skin, because it happens with Vector too. I gave up at that point.

yaronkoren commented 1 year ago

I don't know - I just remember the whole thing not working. Although perhaps it works better with MW 1.39. Although clearly it's not fully working with 1.39 either...

investmentwikiorg commented 1 year ago

Discussion Tools is working well with Miraheze. They point to some initial work to get Parsoid working but say Discussion Tools is running well otherwise.

malberts commented 1 year ago

@investmentwikiorg That's great news. Do you know if that additional Parsoid setup is documented somewhere?

investmentwikiorg commented 1 year ago

@malberts yes should be available here: https://github.com/miraheze/mw-config/blob/a5241cb18294b9d3ed307d131cb3528aff831779/GlobalSettings.php#L65