Update:
Amid the usual blame game that always occurs after any catastrophe in Spain (resigning isn't an option here), the winning theory with the 99% of the votes is that the grid wasn't ready for so much renewable energy, especially solar photovoltaic. The conclusion is that there's a lack of turbines that can stabilize so much solar energy (perhaps autosuggestion, but before the blackout I thought that the sunlight seemed too intense; the sky looked strangely white but without a single cloud).
On the other hand, the connections with France and Morocco are too small to compensate for this lack of turbines. Indeed, the Iberian Peninsula is an energetically self-sufficient island, which is great but also dangerous if you don't have a stable grid. One solution would be to increase the capacity of these connections to help stabilize the grid frequency from outside, but France apparently puts up all kinds of obstacles because it couldn't compete with Spain's abundant cheap solar energy when it comes to exporting energy to the rest of Europe.
Even the former director of REE (Red Electrica Española) says that photovoltaic has increased way too much in recent years without preparing the grid. Pedro Sánchez, of course, continues with his anti-nuclear tirade. What he doesn't say is that if a higher percentage of the mix at the time of the blackout had been nuclear, the blackout probably wouldn't have happened to begin with (in fact, nuclear energy is the most stable of all).
On the positive side, it seems that the restart from scratch was relatively quick having in mind how severe the situation was, with hydroelectric pumping plants being the key to getting the system up and running again. These plants pump water uphill using solar energy in daytime to use this accumulated potential energy at night, in fact if you look at the graphics in REE web, you will see a good chunk of consumption during the sunny hours comes from these plants pumping water uphill. Apparently it took 3 minutes exactly for these plants to stop pumping and begin producing stable power.
So hydroelectric pumping plants made it possible to turn on the combined-cycle plants, and then the rest of the system. Nuclear plants remained off because after a shutdown, xenon poisoning occurs, which prevents them from turning on for a few days. Connections with France and Morocco also helped but not so much because they are tiny (EU says intercountry connections should be 15% at least but Spain-France connection is 3% of Spain's capacity only and much smaller with Morocco)
In short, it seems Tsunami is right and the cause was too much renewable photovoltaic power without adequate grid preparation, having a practically isolated grid didn't help either. Apparently the epicenter of the failure was in some big solar farms located in Extremadura, South West Spain near the border with Portugal.
The rest of Europe has gotten its act together and there will be a special session in the EU Parliament to study the issue. Other countries with many renewables are taking note so that the same thing doesn't happen to them.
Here, for now, the photovoltaic contribution to the mix is being limited, and nuclear power plants remain mostly shut down and only now they appear to start waking up. The lacks are being fulfilled mainly with combined cycle gas plants, which has caused the price of energy to rise considerably since the blackout.