Page MenuHomePhabricator

Readd edit stash config variable
Closed, DeclinedPublic

Description

This shouldn't have been removed. There was nothing wrong with it and in some cases needs to be turned off. Right now it is causing problems for me when it is rendering the page before it should, effectively meaning you have no idea what it will spit out, unless you turn it off.

This happens because rendering one thing then using another doesn't account for if what the rendered thing changes in between the time of the render and edit.

Demo here https://test.miraheze.org/wiki/Aoweijfaowiejf

Event Timeline

Restricted Application added subscribers: RhinosF1, Universal_Omega, Reception123, Aklapper. · View Herald Transcript
Aklapper changed the task status from Open to Stalled.Feb 7 2022, 8:38 PM

@Naleksuh: Which software is this about? What is "this" exactly (name)? For future reference, please use the feature request form (linked from the top of the task creation page) to create feature requests. Thanks.

Naleksuh changed the task status from Stalled to Open.Feb 7 2022, 8:41 PM

@Aklapper There's a feature where when you start typing an edit summary MediaWiki will send a request in the background to start rendering the page, called "edit stash". The config to toggle this feature was removed for discernably no reason, and should be put back so people can disable it if need be.

Ah thanks. For future reference, if this is about wgAjaxEditStash, then it would be welcome to mention the term wgAjaxEditStash.
Assuming that this is about MediaWiki itself, I'm declining this for exactly the reasons given in T274695 (and for missing clear use cases for readding it).

I'd argue it's the opposite. I explained why it should be added in the OP, yet there was no clear reason for removing it ("use case for disabling this is very marginal" is not true and tells nothing)

So, if people need to remove edit stashing you expect them to just directly hack on the core? There was nothing wrong with that configuration option, and actively needs to be disabled for us

What's your specific use case and example for disabling it?

The AJAX api doesn't exist anymore. Given the variable starts with Ajax, I'd assume that's why it doesn't exist anymore. thought it might have been T42787: Remove legacy ajax interface but it seems I'm wrong.

What's your specific use case and example for disabling it?

Earlier today I was working on a page that had multiple images in it. I realized in my preview one of the images didn't exist and uploaded it, but when I switched back to my first tab to save the page, it still showed as nonexistent, because of the edit stash. The edit stash rendered the page before and even though I'd changed, it didn't. That's the problem with rendering before you save, it might change. I was able to reliably reproduce this with https://test.miraheze.org/wiki/Aoweijfaowiejf - it transcludes a template created before that page, but still doesn't exist.

That's the use case for disabling it. This especially applies when there is no functional benefit to enabling it, just may or may not make page loads slightly faster (does it even? Maybe, I'll have to experiment)

I don't think there's anything Miraheze specfic or something we need to track so removing my project

As I understand it, when parser functions are used in wikitext that vary by time, they will result in the stash being seen as invalid when it is no longer valid. There is a tolerance of a few minutes which roughly approximates our tolerance for how long a slow edit save can take to process, plus any differences in database replication lag, plus clock differences between browser and server, and some other factors that may lead to minor race conditions.

Can you elaborate on what particular wikitext feature is not working as intended as result of the edit stash? I suspect that may be a bug, and one we could fix.

It's not just one specific type of wikitext. It's the concept of the edit stash feature as a whole. Because during that time between stash and real save, the render output could change, and in my case it did, leading to a nonexistent output, and even after I purged the page is now in maintenance categories for hours. That's why edit stash should be disableable.

That said, the config could remain gone if the forced value is changed from true to false. I'd have to measure if the stashing makes any noticeable difference

Please keep the status of this ticket as declined and let's concentrate on fixing potential and specific bugs instead. Thanks.

But the entire premise of edit stash is a problem. That's why there needs to be a config (or just remove it completely)

I'll see if there is any actual speed difference from enabling edit stash, or not. If there is, there should be a config. If there isn't, or is very small, it should just be removed completely

@Aklapper So I've measured it locally and there is no speed difference in edit stashing, it's just a feature that creates more problems.

Maybe it saves time in the Wikimedia enviornment, or maybe it doesn't. If it doesn't, it should be removed entirely. If it does, then there is a clear use case for that variable and it needs to be readded