XF 1.4 Mods and Super Mods Get Blank Pages, No Errors

SurferJon

Active member
I have a weird problem. I've just done my test import from myBB to XF, and for some reason I just get blank pages whenever I go to the forums. I tested the accounts and permissions and it's the same for any Moderator or Super Moderator added through the "Moderator" page. The moment you add someone as a Mod or Super Mod, they get blank pages, and no errors are thrown. The users are not part of any other group and there's no other special permissions yet. All the forums are set to "Inherit." So I don't know what the issue is. I've also rebuilt the permissions and user cache and all that.
 
Do you have any addons installed on your test XF board? You can fix the issue increasing the value of memory_limit in your php.ini from 128M to something higher however you should really identify the root cause of the high memory usage.

How many posts does your forum have?
 
This is likely an issue with having a giant number of moderated threads/posts as XF needs to do permission checks on all of them to give you a count. (And having thousands outstanding is not really an expected case.)

They'll need to be cleared out. You may be able to use the batch thread tools (if they're threads) or ideally you can just clear them out before importing. (There are other approaches, but those are the easiest.)
 
My forum has 1,553,446 posts. Do you mean the "unapproved" threads on myBB? We use unapprove all the time to hide posts. Should we be using delete on XF instead?

I did another import and everything was working perfectly until we unapproved a thread. Now the forums broke with the same message.

If it is unpproved threads/posts clogging up things, what do we do? I think on XF they let you soft delete things, which is how we've been using unapprove on myBB. Is there a way to do unapproved posts/threads = soft delete when doing the transfer? If not we're going to lose a lot of posts from over years and years, which we can't... (Assuming this is the issue.)
 
I did a batch update of "Moderated" threads -> soft delete, but it didn't fix the errors. Is it because it didn't get "moderated" posts? (Again, this is all assuming that's even the problem.)
 
We use unapprove all the time to hide posts. Should we be using delete on XF instead?
Most definitely. Content awaiting approval represents content that needs an action (approval or deletion), rather than a long term state so it isn't something XF expects things to be in.

I did a batch update of "Moderated" threads -> soft delete, but it didn't fix the errors. Is it because it didn't get "moderated" posts?
Most likely.

You can't resolve it when importing without editing the code. It's actually a relatively straightforward edit -- you'll find places where "discussion_state" or "message_state" are set to "moderated"; change that to set them to "deleted". Otherwise, you'll need to do it after the fact by editing the DB (by changing those fields values in the xf_thread and xf_post tables). As a stopgap (or when editing the DB as well), you'll need to clear out the contents of the xf_moderation_queue table to indicate that the content is no longer awaiting approval.
 
I'm not very good at editing databases. Is there an SQL command I can run to edit xf_thread and xf_post? It's okay if it screws up something since this is only a test move. We're trying to see how it will go for when we do the real move.
 
It should be:
Code:
UPDATE xf_post SET message_state = 'deleted' WHERE message_state = 'moderated';

UPDATE xf_thread SET discussion_state = 'deleted' WHERE message_state = 'moderated';

Then truncate the xf_moderation_queue table.
 
Oh wow, it actually fixed the problem! Thank you guys!

For the record:

Code:
UPDATE xf_post SET message_state = 'deleted' WHERE message_state = 'moderated';
UPDATE xf_thread SET discussion_state = 'deleted' WHERE discussion_state = 'moderated';
TRUNCATE TABLE `xf_moderation_queue` ;
 
Of course it would help if I was editing the correct database. XD Sorry! I have so many backups and tabs open from trying to do this massive test move that I can't keep them straight.

Code:
UPDATE xf_post SET message_state = 'deleted' WHERE message_state = 'moderated';# 13749 rows affected.
UPDATE xf_thread SET discussion_state = 'deleted' WHERE discussion_state = 'moderated';# MySQL returned an empty result set (i.e. zero rows).
TRUNCATE TABLE `xf_moderation_queue` ;# MySQL returned an empty result set (i.e. zero rows).

xf_thread probably had 0 since I did it through XF's bulk updater.
 
Back
Top Bottom