Replies: 0
So I just realized that a site is generating floods of this type of error when running wfScan:
WordPress database error Unknown column 'SHAC' in 'field list' for query INSERT INTO {prefix}_wfFileMods (filename, filenameMD5, knownFile, oldMD5, newMD5, SHAC) VALUES (
I had all WF tables deleted, and WordFence completely erased and reinstalled with version 6.3.14 to fix the previous “missing fields” database issues, so it should have been 100% clean. Even though it has since been updated to 6.3.16.
Checking into the problem, I think there are two questions/issues.
a) Field SHAC (and one additional for wfFileMods table) was supposedly a version 6.3.6 thing, so why would wfSchema.php for version 6.3.14 and now 6.3.16, which I assumed would carry/install the latest Schema, be missing these fields?
That would allow the ->createAll() to automatically create the necessary table fields from the beginning, rather than relying on later in runInstall() to have to “upgrade” the brand-new tables into correctness.
b) Because of a), the only path to getting correct table(s) is the table upgrades that should not have to happen on a fresh install.
However, runInstall() still has the older issue listed below, which makes it fail to upgrade or insert into certain tables correctly on some installs. Failing to use the right DB prefix if the main domain is no longer on blog-id=1.
Prefix issue:
https://wordpress.org/support/topic/activity-report-email-bad-guys-have-left-the-internet/
also known as your internal incident “FB5929”.
Seems I have to manually fix up the tables and code again. 🙂