Title: CANNOT CREATE NEW GALLERIES
Last modified: April 21, 2020

---

# CANNOT CREATE NEW GALLERIES

 *  Resolved [celinesegel](https://wordpress.org/support/users/celinesegel/)
 * (@celinesegel)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cannot-create-new-galleries-2/)
 * For the last couple of weeks, we haven’t been able to create new galleries. Upgraded
   plugin, WP, lastest PHP version and still same issue.
    Looking in the wp-content/
   debug.log file, I can see that when a gallery is created it’s ID (in the database)
   is defaulting to zero. Since zero is NULL and the table isn’t allowed to have
   null values for the gallery id, it is causing the error. I have replaced the 
   plugin with fresh code and it’s still happening.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [gabyimagely](https://wordpress.org/support/users/gabyimagely/)
 * (@gabyimagely)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cannot-create-new-galleries-2/#post-12726438)
 * Hello [@celinesegel](https://wordpress.org/support/users/celinesegel/),
 * According to another similar ticket, having your database setup to “NO_AUTO_VALUE_ON_ZERO”
   might be generating the issue here.
    If possible, contact your system administrator
   and check with them if that setting is being used and if it is possible to remove
   it.
 * If possible, share with us the name of your hosting provider.
    Please, keep us
   posted.
 * > Developer explanation: This mode causes an `INSERT` statement with a provided
   > ID of zero to be treated as a literal zero (even though auto_increment columns
   > have a minimum value of 1..) and the *default behavior* of mySQL is to treat
   > 0/NULL for auto-increment columns. So… by default `INSERT INTO tmp (id, name)
   > VALUES (0, 'foo')` will create a row that honors the auto-increment attribute,
   > but with that mode, it will just create one row and then generate errors when
   > attempting to create new rows because you can’t have more than one row with
   > the same ID (in this case, zero).
 *  Thread Starter [celinesegel](https://wordpress.org/support/users/celinesegel/)
 * (@celinesegel)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cannot-create-new-galleries-2/#post-12747913)
 * All is now fixed. Hosting company removed the line from the database config. 
   Now we are able to upload photos and create new galleries
    thank you.
    -  This reply was modified 6 years, 1 month ago by [celinesegel](https://wordpress.org/support/users/celinesegel/).
    -  This reply was modified 6 years, 1 month ago by [celinesegel](https://wordpress.org/support/users/celinesegel/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘CANNOT CREATE NEW GALLERIES’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [celinesegel](https://wordpress.org/support/users/celinesegel/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/cannot-create-new-galleries-2/#post-12747913)
 * Status: resolved