Why does updating the front page give a 403, but no other page?

I found the source of the error, and I’ll post my solution here if some lost soul with the same problem happens to stumble upon this question.

The culprit was a piece of JavaScript at the start of the page (some old piece of Google Tagmanager/Analytics that didn’t even work).

I found it by making a copy of the page and removing piece by piece until it was possible to save without an error.

I don’t know why this script-code became a show-stopper all of a sudden, but there you have it! I am happy and hopefully the editors of the site will be too.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)