2022-07-07, 02:01 PM
When trying to create a new thread, I get this error:
This only happens for normal registered users and guest users with no account. This error does not happen for admins or moderators
Obviously its related to the "Spamalyzer" plugin that I use
However, I don't believe this issue is related to mybb, because another mysql db on my website was also giving me this error recently. Perhaps my webhost has upgraded to a new mysql version that changes how db columns work regarding default values. How i fixed it in my other db, was simply to make sure that I'm always passing the value into the mysql insert statement. Previously the value was omitted, and so i guess mysql was trying to use a default value.
Here is a link to the plugin:
https://github.com/mmikeww/mybb-spamalyser
Can anyone with some deeper knowledge help me out?
What lines need to be edited so that I can explicitly pass the pid instead of relying on default values?
or
How can I update the DB schema so that the 'pid' column has a default/empty value if it was omitted in the insert statement?
Quote:MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1364 - Field 'pid' doesn't have a default value
Query:
INSERT INTO mybb_spamalyser_log (event
,score
,details
,dateline
,message
,uid
,username
,fid
,ipaddress
,httpreq
,timeonline
,postcount
,actions
,subject
)
This only happens for normal registered users and guest users with no account. This error does not happen for admins or moderators
Obviously its related to the "Spamalyzer" plugin that I use
However, I don't believe this issue is related to mybb, because another mysql db on my website was also giving me this error recently. Perhaps my webhost has upgraded to a new mysql version that changes how db columns work regarding default values. How i fixed it in my other db, was simply to make sure that I'm always passing the value into the mysql insert statement. Previously the value was omitted, and so i guess mysql was trying to use a default value.
Here is a link to the plugin:
https://github.com/mmikeww/mybb-spamalyser
Can anyone with some deeper knowledge help me out?
What lines need to be edited so that I can explicitly pass the pid instead of relying on default values?
or
How can I update the DB schema so that the 'pid' column has a default/empty value if it was omitted in the insert statement?