After creating a default meta entry in Sprout SEO. Any subsequent updates aren't saved and I get an error message "Couldn't save the default"


  • Craft 2.4.2725
  • Sprout SEO 1.1.1

Has anyone else come across this?

  • Do you see any related errors in your logs (craft/storage/runtime/logs/sproutseo.log)? Commented Dec 22, 2015 at 20:20
  • I don't see a sproutseo.log but I do see craft.log. Not sure what to look for inside the craft log with no obvious errors.
    – Taylor
    Commented Dec 22, 2015 at 20:47
  • The only thing I have been able to track down is that for some reason the id column of the sproutseo_defaults table wasn't auto incrementing. The first entry would result in a 0. haven't been able to figure out why.
    – Taylor
    Commented Dec 23, 2015 at 21:36

1 Answer 1


This issue came as a result of the MySQL DB sql_mode including the NO_AUTO_VALUE_ON_ZERO mode which affects how auto_increment columns work. When trying to create a new row entry it will only auto_increment if null is passed.

Full explanation here:


This setting matched with the way the controller's actionSaveDefault function was setting the id to a blank value rather than a null value caused it to trigger this DB behavior of writing a 0 rather than auto_increment.

While the cause of the issue is not Craft or SproutSEO specific, this answer might help anyone else with the issue.

  1. Check your MySQL DB sql_mode
  2. If, NO_AUTO_VALUE_ON_ZERO is set make sure you're passing null if you want it to auto_increment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.