It seems for some bizarre reason my second test server wiki is now redirecting to the first server :shock: God knows why it is doing that because they are completely separate IP addresses.
Then going directly to a page as opposed to the index does yield the spam results (from the original database)...
Capture.PNG
It looks like the 2006 one is the actual valid entry.
2.PNG
However the entries completely missing from the original database anyway.
Considering the temlib one seems to be from 2020, and the problems seem to be in 2022 where all the entries started getting badly corrupted.
Looking on the temlib copy..
text.PNG
rev.PNG
tl.PNG
I know what the text is and can search for it in my updated database where it is actually there still...
Then I have to use rev_id from that row which is ironically also 6327... And get the page table information... Which does not seem to exist... But this makes sense because the wiki engine is looking for ID 4723017 which definitely does not exist because it was spam.
So doing a search for that particular number..
m.PNG
So getting page_id 1274 and looking in the page table for other edits... There doesn't seem to be any.
So using ID 6327 I go one table back to the revision table and the IDs also there .. So there is one valid page, its just not being linked to the correct text id .
So the fault seems to be in the page table... ID 4723017 is invalid as it was a spam post.
p1.PNG
As the ID #6327 is where the page actually is.. Lets change it..
p1f.PNG
And voilĂ !
f1.PNG
I think the order of images got messed up at some point but it is unlikely to make any sense to anyone anyway :lol:
So basically I need some way of searching for invalid pages and then working out somehow what the last actual edit was which still exists in the database and have a script automatically rearrange the pages to link back to older ID's which actually exist still.
TL:DR
Vaid pages on the wiki got replaced with spam pages several times over. My script removed all the spam so there are "missing pages" now. But the pages are still in the database just several edits behind. I can't use the wiki tools to undo edits either as the edits are not showing correctly in the database. Plus that would take too long to do them all individually.
Obviously I cannot spend over an hour figuring out every single missing page as I would be here for the next several months. So I need to figure out a script to scan the database for missing pages automatically and then figure out what the last valid edit page was in the store that page index.