Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wordpress sqlite driver throw constraint exception when updating options #59

Open
flymonkey00 opened this issue Nov 30, 2023 · 2 comments

Comments

@flymonkey00
Copy link

WordPress version: 6.4.1
sqlite-database-integration version: 2.1.2

After using the sqlite db driver, when I try to update Default post settings (Settings-Discussion) it always failed. And I can see the error log like this:

MySQL query:
UPDATE wp_options SET option_value = NULL WHERE option_name = 'comment_registration'
Queries made or created this session were:
Executing: BEGIN | (no parameters)
Executing: UPDATE wp_options SET option_value = NULL WHERE option_name = :param0 | parameters: comment_registration
Executing: ROLLBACK | (no parameters)

and

Error occurred at line 3373 in Function handle_error. Error message was: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: wp_options.option_value.

This issue appears to be caused by a misalignment of metadata for certain database tables.

@mati75
Copy link
Contributor

mati75 commented Dec 23, 2023

Confirm, I have the same error. It look like on missing param1 instead of NULL.

@hawm
Copy link

hawm commented Oct 9, 2024

Same issue. I just found a temporary working solution aaemnnosttv/wp-sqlite-db#18 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants