• 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
    • ErrorException: Fatal Error: Call to a member function thumbnail() on a non-object

    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: ErrorException: Fatal Error: Call to a member function thumbnail() on a non-object

    • Issue Tools
      • View Changes
    1. issueid=4454 November 23, 2015 1:44 PM
      WebFusion2 WebFusion2 is offline
      New Member
      ErrorException: Fatal Error: Call to a member function thumbnail() on a non-object
      Getting this error every time a image file attachment is added

      Hello,

      This error is showing up in the Xenforo Server Error Logs every time someone adds an image file attachment to the wiki:

      Code:
      ErrorException: Fatal Error: Call to a member function thumbnail() on a non-object - vault/core/controller/dm/attach/thumb/xf.php:88
      Is this a server-issue (i.e. something that needs to be configured), or a bug in VW?

      P.S. We're loving the wiki system!
    Issue Details
    Issue Number 4454
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Attachments
    Status Fixed
    Priority 4 - Warnings / Script Errors
    Affected Version 4.0.7
    Fixed Version 4.0.8
    Milestone (none)
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags attachments, error




    1. November 23, 2015 2:12 PM
      pegasus pegasus is offline
      VaultWiki Team
      What do you have selected in AdminCP > Options / Setup > Options > Attachments > Default Image Processor?

      This can occur if you use a custom processor (not GD or ImageMagick), AND if that processor does not extend from XenForo_Image_Abstract, AND if that processor does not function a thumbnail function. If this is the case, then it is a bug in the custom processor.

      I have confirmed that all of the default image processors provided by XenForo provide the thumbnail function.

      It is also possible if one of the following functions does not exist in your PHP installation:
      imagecreatefromgif - PHP compiled --with-gd
      imagecreatefrompng - PHP compiled --with-png-dir
      imagecreatefromjpeg - PHP compiled --with-jpeg-dir

      In this case, VaultWiki could handle the missing capability more gracefully. I've confirmed this as a bug for this reason.

      In vault/core/controller/dm/attach/thumb/xf.php, find:
      Code:
      $image->thumbnail($width, $height);
      Before it, add:
      Code:
      if (empty($image)) return '';
      Reply Reply
    2. November 23, 2015 2:19 PM
      WebFusion2 WebFusion2 is offline
      New Member
      Hmmm....the "PHP built-in GD image library" is the one that is selected (the default selection).
      Reply Reply
    3. November 23, 2015 2:25 PM
      WebFusion2 WebFusion2 is offline
      New Member
      Yep, just confirmed that GD library is enabled with phpinfo.php:


      GD Support enabled
      GD Version bundled (2.1.0 compatible)
      FreeType Support enabled
      FreeType Linkage with freetype
      FreeType Version 2.3.11
      GIF Read Support enabled
      GIF Create Support enabled
      JPEG Support enabled
      libJPEG Version 6b
      PNG Support enabled
      libPNG Version 1.2.49
      WBMP Support enabled
      XPM Support enabled
      libXpm Version 30411
      XBM Support enabled
      Reply Reply
    4. November 23, 2015 2:29 PM
      pegasus pegasus is offline
      VaultWiki Team
      Marked as fixed in the next release. Even though the installer will not set the "is an image type" value if the required functions are not compiled in PHP, it was possible for an admin to manually turn this on anyway. In the next release, it will not be possible to turn on manually without the required functions. For existing misconfigurations, attempts to make the thumbnail will fail silently, rather than throw a fatal error.
      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 9:11 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 © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.