• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Database error and undefined index error when accessing Xenforo moderation queue

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Database error and undefined index error when accessing Xenforo moderation queue

    • Issue Tools
      • View Changes
    1. issueid=4932 March 1, 2017 11:03 AM
      ACL ACL is offline
      Regular Member
      Database error and undefined index error when accessing Xenforo moderation queue

      There is no link to the moderation queue in the Xenforo admin/moderation bar despite one wiki article having an unmoderated revision. If I manually navigate to the article with the unmoderated revision I can approve it through the revision history screen. At the time of the error there was no non-wiki content needing moderation.

      Database error:
      Code:
      XenForo_Exception: Database Error: SELECT `m`.`userid` AS `userid`,`m`.`nodeid` AS `nodeid`,`m`.`nodetypeid` AS `nodetypeid`,`m`.`options` + 0 AS `options`,`u`.`username` AS `username`,`u`.`email` AS `email`,`u`.`language_id` AS `languageid` FROM `vw_moderator` `m` LEFT JOIN `xf_user` `u` ON (`u`.`user_id` = `m`.`userid`) WHERE `m`.`userid` IN () Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 - vault/core/controller/db/xf.php:173
      Code:
      #0 /home/user/public_html/vault/core/controller/db/xf.php(189): vw_DB_Controller_XF->throw_error(Object(Zend_Db_Statement_Mysqli_Exception), 'SELECT `m`.`use...')
      #1 /home/user/public_html/vault/core/model/db/mysql/vw.php(27): vw_DB_Controller_XF->query_read('SELECT `m`.`use...')
      #2 /home/user/public_html/vault/core/model/moderator/vw.php(128): vw_DB_MySQL_Model->select(Array)
      #3 /home/user/public_html/vault/core/model/moderator/vw.php(60): vw_Moderator_Model->query(' `m`.`userid` I...')
      #4 /home/user/public_html/vault/core/model/permissions/vw.php(351): vw_Moderator_Model->get_by_userid(Array)
      #5 /home/user/public_html/vault/core/model/permissions/vw.php(238): vw_Permissions_Model->get_from_db(Array, Array, false)
      #6 /home/user/public_html/library/vw/XenForo/ModerationQueueHandler/vw.php(48): vw_Permissions_Model->pre_cache(Array, Array)
      #7 /home/user/public_html/library/XenForo/Model/ModerationQueue.php(148): vw_XenForo_ModerationQueueHandler_vw->getVisibleModerationQueueEntriesForUser(Array, Array)
      #8 /home/user/public_html/library/XenForo/ControllerPublic/ModerationQueue.php(42): XenForo_Model_ModerationQueue->getVisibleModerationQueueEntriesForUser(Array)
      #9 /home/user/public_html/library/XenForo/FrontController.php(351): XenForo_ControllerPublic_ModerationQueue->actionIndex()
      #10 /home/user/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
      #11 /home/user/public_html/index.php(13): XenForo_FrontController->run()
      #12 {main}
      Code:
      array(3) {
        ["url"] => string(57) "https://path/to/moderation-queue"
        ["_GET"] => array(0) {
        }
        ["_POST"] => array(0) {
        }
      }
      And the undefined index error, which was generated at the same time by the same page:
      Code:
      ErrorException: Undefined index: - vault/core/model/permissions/vw.php:247
      Code:
      #0 /home/user/public_html/vault/core/model/permissions/vw.php(247): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/auschr1/x...', 247, Array)
      #1 /home/user/public_html/vault/core/model/permissions/vw.php(238): vw_Permissions_Model->get_from_db(Array, Array, false)
      #2 /home/user/public_html/library/vw/XenForo/ModerationQueueHandler/vw.php(48): vw_Permissions_Model->pre_cache(Array, Array)
      #3 /home/user/public_html/library/XenForo/Model/ModerationQueue.php(148): vw_XenForo_ModerationQueueHandler_vw->getVisibleModerationQueueEntriesForUser(Array, Array)
      #4 /home/user/public_html/library/XenForo/ControllerPublic/ModerationQueue.php(42): XenForo_Model_ModerationQueue->getVisibleModerationQueueEntriesForUser(Array)
      #5 /home/user/public_html/library/XenForo/FrontController.php(351): XenForo_ControllerPublic_ModerationQueue->actionIndex()
      #6 /home/user/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
      #7 /home/user/public_html/index.php(13): XenForo_FrontController->run()
      #8 {main}
      Code:
      array(3) {
        ["url"] => string(57) "https://path/to/moderation-queue"
        ["_GET"] => array(0) {
        }
        ["_POST"] => array(0) {
        }
      }
    Issue Details
    Issue Number 4932
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Moderator Tools
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.0.16
    Fixed Version 4.0.18
    Milestone (none)
    Software DependencyXenForo 1.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 1
    Assigned Users (none)
    Tags (none)




    1. March 1, 2017 12:28 PM
      pegasus pegasus is offline
      VaultWiki Team
      In library/vw/XenForo/ModerationQueueHandler/vw.php, find:
      Code:
      vw_Hard_Core::model('User')->validate($viewingUser)
      Replace with:
      Code:
      vw_Hard_Core::model('User')->unvalidate($viewingUser)
      Reply Reply  
    2. This petition for a change to Awaiting Feedback was rejected
      April 18, 2017 1:08 PM
      ACL ACL is offline
      Regular Member
      In 4.0.17 unapproved edits are again not showing up in the Xenforo moderation queue. Just as before I can see an unapproved revision by manually browsing to the relevant wiki page. However this time there is no database or undefined index error. Any suggestions?
       
    3. April 18, 2017 2:01 PM
      pegasus pegasus is offline
      VaultWiki Team
      4.0.17 was released before this issue was reported. Have you tried applying the edit in my previous reply?

      I do not have any issue with unapproved revisions on my XenForo board; just tried one and it appeared in the queue.
      Reply Reply  
    4. April 18, 2017 9:07 PM
      ACL ACL is offline
      Regular Member
      In the first instance I reapplied the above edit after submitting a not-yet-approved edit, and the queue was empty (prior to my post).

      Now I've tried submitting another moderated edit, with the file edit applied at the start, but the mod queue is still empty. Further to that I tried submitting a whole new page that'd need to be moderated and that too doesn't show in the mod queue but I can however see it in the wiki area as awaiting moderation.
      Reply Reply  
    5. April 18, 2017 10:29 PM
      ACL ACL is offline
      Regular Member
      The xf_moderation_queue table is empty. Perhaps an Xenforo data import failed somewhere, since watched wiki content notifications (whether as alerts only, or alerts + instant email) are not displaying/sending either (but xenforo alerts for core functions and other addons do work).

      I'll roll back and restart the import and see whether the mod queue (and wiki notifications) will work then.
      Reply Reply  
    6. April 19, 2017 8:50 AM
      pegasus pegasus is offline
      VaultWiki Team
      This is not related to importing. You should not restart the import for this issue.

      The wiki moderation queue entries are not actually placed in the xf_moderation_queue table. They are placed in the vw_ping table, which controls various types of alerts in VaultWiki. The contents of both tables are used when viewing the moderation queue. If you have vw_ping entries with both pingtype = 0 and userid = 0, those are moderation queue entries.

      If there are no queue entries in vw_ping:
      - If watched content notifications are not sending, this might be a clue to why your moderation queue is not updating, since the processes are similar.
      - Are XenForo's error logs empty? If not, please look for entries that mention 'instantmodalert'.

      If there are queue entries in vw_ping:
      - There are also some add-ons that interfere with wiki entries appearing on the moderation queue. I don't remember the names, but one is a moderation-related add-on. If you have any add-ons like this, try disabling them first to see if it makes a difference.
      Reply Reply  
    7. April 19, 2017 9:13 AM
      ACL ACL is offline
      Regular Member
      Hi pegasus,

      I've rolled back and have restarted the import, as I needed to apply some other changes unrelated to VaultWiki on a clean copy of Xenforo (without posts, etc) at some point.

      I don't recall any (recent) error logs for instantmodalert, but I'll check that as soon as the data import for Xenforo followed by MW->VW are completed.
      Reply Reply  
    8. April 19, 2017 11:12 PM
      ACL ACL is offline
      Regular Member
      Quote Originally Posted by pegasus
      The wiki moderation queue entries are not actually placed in the xf_moderation_queue table. They are placed in the vw_ping table, which controls various types of alerts in VaultWiki. The contents of both tables are used when viewing the moderation queue. If you have vw_ping entries with both pingtype = 0 and userid = 0, those are moderation queue entries.

      If there are no queue entries in vw_ping:
      - If watched content notifications are not sending, this might be a clue to why your moderation queue is not updating, since the processes are similar.
      - Are XenForo's error logs empty? If not, please look for entries that mention 'instantmodalert'.
      Alright, so the vw_ping table is empty, despite one unmoderated revision needing approval. On the article's page the message "This page has an edit awaiting moderation" is displayed to moderators though.

      Xenforo File Health Check reports of some files having unexpected contents that look to be related to the security patch for 4.0.17. The Wiki tab of the admin area however correctly states that the installed version is v4.0.17 Patch Level 1. In any event I've emptied the library/vw/* and vault/core* directories and reuploaded 4.0.17 followed by 4.0.17 PL1 just in case something wasn't correct.

      But unfortunately, the problem remains for both moderation queue and watched wiki content notifications.
      Reply Reply  
    9. April 20, 2017 1:47 AM
      ACL ACL is offline
      Regular Member
      So I've downgraded from 4.0.17 PL1 to 4.0.17 (b002) files and now moderated content is correctly adding rows to vw_ping, and hence also the moderation queue does display something now. Notifications are also sending, whether as alerts or alerts + email.

      So it would appear a change in Patch Level 1 is causing this in my case.
      Reply Reply  
    10. May 8, 2017 10:43 AM
      pegasus pegasus is offline
      VaultWiki Team
      I have not had any issues with instant moderator alerts or with wiki entries not appearing in the xf_moderation_queue in 4.0.17 PL 1. There are actually no changes in PL 1 that are remotely related to it, so a difference between non-PL and PL in this regard does not make sense. If the issue persists, I would request another look via ticket.
      Reply Reply  
    11. May 8, 2017 12:19 PM
      ACL ACL is offline
      Regular Member
      Ok, interesting. It is all very strange since I did replace all the files with clean 4.0.17 PL1 copies which didn't fix the issue, and then did the same thing again but with 4.0.17 b002 files and the issue was fixed.

      I think what I will do is hold out for 4.0.18 and then recheck whether the watched/moderator alerts break again at that time. If in 4.0.18 they are broken in my VaultWiki instance then I will submit a ticket.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 3:18 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.