Page MenuHomePhabricator

Allow editing and moving to be done as a simulataneous operation
Closed, InvalidPublic

Description

This would be a convenient option to have within the API, specifically for a script like AFCH; AFCH moves a draft and then removes the templates, but sometimes the templates aren't removed because the edit is interrupted after the move is done.

Currently, moving creates a null edit in the page history, so implementing should not be terribly difficult.

This is just an idea, though, and I am sure there are conceptual problems, which I would be happy to see in comments.

Event Timeline

Retro renamed this task from Allow editing and moving to be done as an atomic option to Allow editing and moving to be done as an atomic operation.Jul 2 2019, 5:27 PM

the edit is interrupted after the move is done.

What does "interrupted" mean? What creates that interruption? Can you point to examples? It's unclear to me what the problem is.

implementing should not be terribly difficult

See https://www.mediawiki.org/wiki/Gerrit/Tutorial how you can propose your patch. :)

@Aklapper

What does "interrupted" mean? What creates that interruption? Can you point to examples? It's unclear to me what the problem is.

I will admit this is partly a theory of mine, so it could be off-base, but I think that sometimes the script does the move, but then doesn't load the next part of the script to carry out the necessary edit because the page is reloaded. This is based on a comment from @Primefac in an on-wiki discussion: "If the page is refreshed before AFCH finishes its job it can often result in the templates not being removed."

I do know there are examples of AFCH moving the page but not editing: this page move was not followed by an automatic edit removing the draft templates (I had to do it manually).

I really just filed this to put the idea on the table more than anything; I'm perfectly fine if this turns out won't fix for some yet-unforeseen reason, or if there are better solutions for the particulars of the AFCH problem.

See https://www.mediawiki.org/wiki/Gerrit/Tutorial how you can propose your patch. :)

Oh, I know the obstacles that come with developing. Perhaps I phrased that poorly; I was more intending to emphasize a contrast between the (in concept) straightforward implementation and the unforeseen side effects that would come along with such an implementation.

You won't be seeing any patches from me soon, as PHP is not my forte, but maybe someday! ;-)

Heh, thanks! :) "If the page is refreshed" makes me wonder what refreshes the page and why.

This task really welcomes a clear list of steps what actions are performed, what you expect to happen, and what happens instead.

I think there are 2 separate things here:

  • The specifics of the AFCH issue
  • The general usefulness of my proposed simultaneous move/edit action.

If the AFCH issues are resolved without requiring revisions to MediaWiki core, that will be great, but it doesn't necessarily mean this suggestions are without merit for other purposes. If AFCH is not resolved, it does not mean this specific suggestion has merit, either. This task filing is premature in regards to whether it will help improve AFCH, but there's no harm in having a place for people to express their opinions on the general idea.

Retro renamed this task from Allow editing and moving to be done as an atomic operation to Allow editing and moving to be done as a simulataneous operation.Jul 4 2019, 8:27 PM

I'm afraid that this is a potential "solution" without a clear problem description (steps to reproduce are missing) and if there is some problem in AFCH, then AFCH needs to be looked at and potentially fixed instead of changing the fundamental architecture in MediaWiki. Hence I'm closing this task. Feel free to reopen if you can provide clear and specific steps to reproduce which allow someone else to follow those steps to reproduce a specific problem.