Page MenuHomePhabricator

Changes in JSON mode do not get saved [Regression]
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Go to an arbitrary object page
  • Click on edit
  • Switch to JSON mode (i.e. {..})
  • Make a valid edit
  • Click on "Save"

What happens?:

  • We get back to the View page, but the change has not been saved
  • Also no error message has been shown

What should have happened instead?:

  • Either save the change or return an error message with the error

NOTE: The issue just happens if the save button is clicked directly and the focus goes from the JSON container to the save button. if the user clicks outside of the json and triggers a blur event first and then click saves, everything work. Quite probably the issue is the data being fetched and saved before the object is changed (because changeType is async prob)

Event Timeline

Hi @DVrandecic .

I have been able to change the json in multiple instances without any problem. I even tried to do directly without clicking outside of the box first, but it all seem to work ok.

Can you please record a video please for me.. also can you check the network tab to see if the request is actually made and what is the payload of it.

https://www.loom.com/share/b628d89d7c9f48a5872fcbf97043b602

After discussion with Denny we found out the issue to be async loading of the change event. I have modified the description to align with this finding

Change 760641 had a related patch set uploaded (by Jkieserman; author: Jkieserman):

[mediawiki/extensions/WikiLambda@master] trigger the clickouthandler even if only the submit button was clicked

https://gerrit.wikimedia.org/r/760641

Change 760641 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] trigger the clickouthandler even if only the submit button was clicked

https://gerrit.wikimedia.org/r/760641