• Resolved ArtCharacter

    (@artcharacter)


    Dear Imagely Support,

    I am experiencing a serious issue with the NextGEN Gallery plugin (latest version) on my WordPress site.

    When I try to create a new gallery or upload images, I receive the following database error in the error log:

    [01-Jun-2025 14:03:10 UTC] WordPress database error Column ‘extras_post_id’ cannot be null for query INSERT INTO wp_nh_2022ngg_gallery (author, extras_post_id, galdesc, gid, name, pageid, path, previewpic, slug, title) VALUES (‘1’, NULL, NULL, NULL, ‘uj-teszt-galeria’, ‘0’, ‘/wp-content/gallery/uj-teszt-galeria/’, ‘0’, ‘uj-teszt-galeria’, ‘uj-teszt-galeria’)

    This happens every time I try to create a gallery, and as a result, the gallery is not saved to the database.

    What I have already checked:

    • File permissions are correct (755).
    • My user has administrator rights.
    • The extras_post_id column in the wp_nh_2022ngg_gallery table is set to NOT NULL.
    • I disabled all other plugins and switched to a default theme (Twenty Twenty-Four), but the issue persists.

    It seems the plugin is failing to create the associated post entry and thus passes a NULL value into the database.

    Could you please let me know how to resolve this issue?

    Thank you in advance for your help.

    Best regards, Tamás Horváth

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @artcharacter,

    Thank you for reaching out,

    Looking into the error code, it appears to be an issue with the having your database setup to “NO_AUTO_VALUE_ON_ZERO” SQL mode.

    Please ask the hosting support to deactivate “NO_AUTO_VALUE_ON_ZERO” SQL mode and also, please ask their help to ensure that the wp_ngg_pictures > PID is set to auto-increment.

    Once that’s done, try uploading some images to any of your galleries and let me know if this fixes the issue.

    Thanks!

    Hi @artcharacter,

    We haven’t heard back from you in a few days, so I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.

    Thanks!

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

The topic ‘Cannot Create New Gallery – “extras_post_id cannot be null” Database Error’ is closed to new replies.