-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish/Save button not responding #1871
Comments
Sounds like the problem is ultimately that the button doesn't get disabled after you click it. You shouldn't be able to hit publish or save after having already hit publish or save until the previous submission has finished. Edit: Ohhh wait no, you're saying you hit publish before the requests that populate the page have finished loading. |
Workaround for now: Just don't do that. :p I'm not sure what a proper fix would look like. I don't think it's feasible to check for requests in progress and disable the buttons until the requests finish, for example. |
Yes. Only when someone click publish too fast before the graphql response returned. This was noticed by a client where the requests for graphql was slow they could not click publish. |
Note that the specific scenario in the issue description has been fixed - but this still represents a problem that if the page form elements haven't all fully loaded and someone submits the form, the results are currently undefined but could result in incorrect behaviour. Because of that I'm keeping this open. Ideally there would be some sort of "FormIsReady" boolean which is false until all elements on the form have fully rendered, though I don't know if we can do that in a sensible way with the current architecture. |
Module version(s) affected
2.3
Description
Note
This issue is only present in version 2.3. Version 2.2.14 works fine.
The save and publish buttons sometimes don't respond when they are clicked. In version 2.3.3 this changed to show the animated 3 dots. The animation does not stop and the button stops working. This change is related to #1865
How to reproduce
/admin/graphql
for each elemental areacancelled
. The requests may load fast, which makes it hard to replicate. I edited the controllerSilverStripe\GraphQL\Controller
, and addedsleep(1);
toindex
method to slow down the request.CMS user should be able to click the publish button even if the graphql requests in the background are not complete.
Possible Solution
Adding a check before the loop resolves the issue. With this change,
componentDidUpdate
is called multiple times until the publish request is complete. Not sure if this change is the correct fix or not!Additional Context
When the publish button is clicked before the graphql request is complete, there is a JS error from the elemental module related to the property being null https://github.com/silverstripe/silverstripe-elemental/pull/1214/files#diff-c39249a4fbdce6643c1a42ee2ba287a0a7b9ffd10720d3dfa6fa8bd19e9be81cR41
Validations
silverstripe/installer
(with any code examples you've provided)The text was updated successfully, but these errors were encountered: