To say the Spanish government blundered on the catalonian question would be, to put it mildly, a massive bloody understatement.

The referendum had already been ruled unconstitutional by the federal supreme court. They could have just waited, allowed the election, then pulled out the ruling and a massive middle finger, while pushing the fact that the referendum was not representative of the catalan population (with only 49 percent in favor), but that would have really just been the cherry on the cake.

Sure the catalan secessionists would have had an extra bargainning chip, but would anyone have really cared? Also their support could have been cut from right under their feet. Really Simply.
Basically like with most secessionist movements, it's really all about the money. They represent roughly 20 percent of Spanish GDP and pay way over their population capita. This leads to Frustration.
As some sort of wise man must once have said; Frustration, leads to Anger, Anger leads to Hate and Hate leads to "stupid" parties winning elections.

Basically, the Catalans had their autonomy checked by the same Supreme Court when they cut their Statute of Autonomy back in 2010. This usually tends to fuel frustration, especially when you can't fix your own tax rate and you end up picking up the bill for that retarded cousin whose town you sometimes visit during the holidays.

Basically the solution is to just reinstate the original Statute of Autonomy 2006, which the federal parliament passed btw, and give the Catalans the same powers as their Basque counterparts (fixing their own tax rate).
But why make it easy when it can be hard, so ship in a bunch of riot police from the rest of Spain, because shocker Catalans don't like beating on Catalans, and beat the shit out of a bunch of peaceful men, woman, tweens, teens, old men, old woman and basically anything with a pulse; because lets face it, in this day and age we all know that no one has a phone, the internet doesn't exist, and the press is not attracted to conflict....who know's maybe you can even hit some Catalan police officers in the process; who likes them anyway, I mean they only represent the same institution you enforce, but let's not get bogged down by the details.

The Spaniards have had the indecency of showing us the holes that exist in the current democratic fabric of our westernized world. Because it begs the question; what happens when enough people decide that they want to achieve a tangible goal and can vocalize it, and really don't care about the consequences.

Well the answer is clear, and it's a resounding "We'll beat it out of you". This I will never forgive them for, because the notion of Democracy gave me this warm fuzzy feeling.
Give me back my ignorance, give me back my bliss.