• 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
    • Getting "Undefined Index attachfileid" error

    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: Getting "Undefined Index attachfileid" error

    • Issue Tools
      • View Changes
    1. issueid=4374 September 15, 2015 1:16 PM
      clackey clackey is offline
      New Member
      Getting "Undefined Index attachfileid" error

      We're on Vaultwiki 4.0.6, latest version + Xenforo 1.5.

      We've been getting an error 'Undefined index: attachfileid' ever since 4.0.5. I didn't report earlier as I was hoping the upgrade to 4.0.6 would have fixed it.

      The only real change we made in 4.0.5 was we couldn't figure out how to make the homepage have a different author name from within the Vaultwiki UI, so I went through the database and replaced all instances in vw_* tables of the userID and username of the person who originally installed Vaultwiki with the desired username/userID and then rebuilt the caches. Everything seemed to work fine, and I unfortunately don't remember if this error was happening before this change.

      Here is the stacktrace from Xenforo--some of them say 'Unknown Account' and some of them have a named user account:

      Code:
      ErrorException: Undefined index: attachfileid - vault/core/controller/asset/vw.php:117
      Generated By: Unknown Account, 56 minutes ago
      Stack Trace
      #0 /home/nginx/domains/phantompilots.com/public/vault/core/controller/asset/vw.php(117): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/nginx/dom...', 117, Array)
      #1 /home/nginx/domains/phantompilots.com/public/vault/core/controller/asset/vw.php(52): vw_Asset_Controller->verify_pageid(1)
      #2 /home/nginx/domains/phantompilots.com/public/library/vw/XenForo/ControllerPublic/Wiki/Asset.php(42): vw_Asset_Controller->resolve()
      #3 /home/nginx/domains/phantompilots.com/public/library/XenForo/FrontController.php(347): vw_XenForo_ControllerPublic_Wiki_Asset->actionIndex()
      #4 /home/nginx/domains/phantompilots.com/public/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
      #5 /home/nginx/domains/phantompilots.com/public/index.php(13): XenForo_FrontController->run()
      #6 {main}
      Request State
      array(3) {
        ["url"] => string(52) "http://www.phantompilots.com/wiki_index-asset/?pid=1"
        ["_GET"] => array(2) {
          ["/wiki_index-asset/"] => string(0) ""
          ["pid"] => string(1) "1"
        }
        ["_POST"] => array(0) {
        }
      }
      Let me know what other info you need.
    Issue Details
    Issue Number 4374
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Attachments
    Status Fixed
    Priority 4 - Warnings / Script Errors
    Affected Version 4.0.6
    Fixed Version 4.0.7
    Milestone (none)
    Software DependencyXenForo 1.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. September 16, 2015 8:06 AM
      pegasus pegasus is online now
      VaultWiki Team
      This error will occur when trying to view/download a corrupt attachment (an attachment that was uploaded but the actual file content is missing). To silence the error, edit vault/core/controller/asset/vw.php. Find:
      Code:
      if (!$page OR !$page['attachfileid'])
      Replace with:
      Code:
      if (!$page OR empty($page['attachfileid']))
      Reply Reply
    2. September 21, 2015 5:26 PM
      clackey clackey is offline
      New Member
      Thanks, based on this I was able to track down the corrupt attachment in vw_attachmentfile and delete the row with the missing attachfileid.
      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 10:26 AM.
    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.