I think this has to do with the batch system, though I am not sure.
I have written an install profile for D8, everything was fine then D8 changed (as it does) and there was a problem with the script when it was trying to register node types. Before the node types where in the config system they where registered in code. I did this with a loop (so did the standard install profile). This caused an error that wasn't getting reported.
I have reproduced this by putting the following code into the minimal install profile.
for($i = 0; $i <= 10; $i ++) {
fake_function_of_doom();
}
without the loop it will error out just fine, however, with the loop it errors silently. Depending on the function it will error silently and just hang or it will try and restart the installation process.
Comments
Comment #1
Thomas Brekelmans CreditAttribution: Thomas Brekelmans commentedI don't think your loop runs?
Your condition ($i == 10) will never be met because it's not TRUE when the loop starts ($i = 0), so the increment ($i ++) will never happen and the body of the loop won't be executed I think?
If you change your condition to $i <= 10 or something similar that'll get the loop running.
See:
http://php.net/manual/en/control-structures.for.php
Comment #2
frobWhoops, I must have injected a typo when I copied it over to the issue. I have fixed the issue summery.
Comment #2.0
frobUpdated issue summary.
Comment #3
tlyngej CreditAttribution: tlyngej at Annertech commentedDoes hook_task even exist anymore?
This issue might be obsolete.
Comment #4
frobI think it is hook_install_task now, but I am still looking.
Either way this still needs to be tested/reviewed patched or closed.
btw, I am looking at function install_tasks($install_state) in install.core.inc
Comment #5
tlyngej CreditAttribution: tlyngej at Annertech commentedRight, let's see if we can get it to fail in the hook_install_task() then. That should be easy enough.
Comment #6
frobComment #7
tlyngej CreditAttribution: tlyngej at Annertech commentedTested this by adding the following to minimal.install
It ran just fine.
Then I appended
fake_function_of_doom();
to for loop. Ran it again and got a:It does look like the issue has been fixed at some point over the last couple of years.
frob, what do you think?
Comment #8
frobSounds fixed to me. Could you post the code that generated the error?
Comment #9
tlyngej CreditAttribution: tlyngej commentedWhat I did to make the installation stall was just adding to the loop. Like this