1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Troubleshooting and Problems' started by SurferJon, Apr 7, 2015.

  1. SurferJon

    SurferJon 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.
  2. Solidus

    Solidus Well-Known Member

    Add this to library/config.php

    ini_set('display_errors', true);
    An error may appear on the blank page.
  3. SurferJon

    SurferJon Member

    Oh thanks! Here's the error I get:

    Attached Files:

  4. imthebest

    imthebest Formerly Super120

    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?
  5. Mike

    Mike XenForo Developer Staff Member

    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.)
    SurferJon likes this.
  6. SurferJon

    SurferJon Member

    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.)
  7. SurferJon

    SurferJon Member

    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.)
  8. Mike

    Mike XenForo Developer Staff Member

    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.

    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.
    SurferJon likes this.
  9. SurferJon

    SurferJon Member

    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.
  10. Brogan

    Brogan XenForo Moderator Staff Member

    It should be:
    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.
    SurferJon likes this.
  11. SurferJon

    SurferJon Member

    Oh wow, it actually fixed the problem! Thank you guys!

    For the record:

    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` ;
  12. SurferJon

    SurferJon Member

    Oh wait, no it didn't... it was because I was logged out. Ughhh.
  13. Brogan

    Brogan XenForo Moderator Staff Member

    Do you have a lot of open reports?

    If the problem was due to moderated threads and posts, that should have resolved it.
  14. SurferJon

    SurferJon Member

    I can't see if I do, I just get the error messages.
  15. SurferJon

    SurferJon Member

    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.

    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.
  16. Brogan

    Brogan XenForo Moderator Staff Member

    That many moderated posts would definitely cause the problems you experienced.

    Hopefully it's all sorted now.
    SurferJon likes this.

Share This Page