So on the DB screen I clicked "Install", it was loading the next page, and I clicked it again (by mistake, I swear!). Then instead of loading the next page, it skipped immediately to the configure form (of course, most of drupal wasn't installed yet). The form actually looked fine, but hitting submit and major breakage happaned (i.e., a fatal error).
There are two probable solutions that I can see, but others probably have better ideas:
1. Do one of those annoying javascirpt things that blocks the button if you've clicked it
2. Actually be smart and keep track of where in the install you are so it can pick up where it left off (unlikely, but hey, PHP is turing complete)
Comments
Comment #1
jbrown commentedI've replicated this.
Double clicking "Save and continue" means that you straight to the site information form.
The next page is just the following error:
It definitely needs to be fixed as people quite often double click when it is not necessary.
Ideally, both solutions 1 + 2 should be implemented.
I have had clients encounter problems before with forms being submitted multiple times. Drupal forms system should prevent this from happening.
Comment #3
David_Rothstein commentedOne of the problems here (with this specific form) is that it does so much when you submit it - on the same page request, it installs the entire system.module and all its database tables, plus the user module too.
So if you are running on a machine that is not ultrafast, it might sit there a long time and you might think it's broken and be tempted to double-click.
We could alleviate the issue a bit by trying to move a lot of that processing into the batch step, so the form doesn't freeze when you submit it... but then we'd still somehow have to make sure the {batch} table itself was created and available beforehand. This might be difficult.
Agreed with @jbrown that any other "double-click" prevention solution should probably be done more generally in the form API (probably via a separate issue).
Comment #4
David_Rothstein commentedI just discovered #483876: Disable install button once clicked (which this is almost a duplicate of). They eventually leaned against the approach of disabling the button...
However, we can continue with the other solutions here. The installer is faster than it used to be, but for some browser/server combinations, I think this is still a problem that can happen.
Comment #5
helmo commentedA related generic form issue: #1705618: Double click prevention on form submission
Comment #6
clemens.tolboomThere is a more general discussion in #1705618: Double click prevention on form submission
It has a patch taken from a non generic #483876: Disable install button once clicked
Comment #7
clemens.tolboomAs #1705618: Double click prevention on form submission is now fixed for 8.x please retest and close.
#1705618: Double click prevention on form submission is scheduled for backport too.
Comment #16
quietone commented#1705618: Double click prevention on form submission was committed to 8.4.x
I tested with Drupal 8.9.13-dev and was not able to reproduce the problem. Multiple clicks on the buttons on the install screens did not interrupt the install process.
Therefore, closing as cannot reproduce. If you are experiencing this problem reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").
Thanks!