Unable to activate mod_security firewall in Plesk 12.5, the following error appears:
Failed to install the Mod-security rule set: Unable to find row with id 221 in domains table. Unable to use the current Apache configuration file and to roll back to the previous version of the file because they contain an invalid configuration.
Fix database inconsistency using Plesk self-repair tool.
Run from command line:
plesk repair db
After that enable mod_security again.