• 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
    • [E_WARNING] Undefined variable $resized

    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: [E_WARNING] Undefined variable $resized

    • Issue Tools
      • View Changes
    1. issueid=6395 October 20, 2023 2:02 AM
      mazzly mazzly is offline
      Junior Member
      [E_WARNING] Undefined variable $resized

      Code:
      ErrorException: [E_WARNING] Undefined variable $resized src/addons/vw/vw/_core/model/image/format/vw.php:1065
      Generated by: Unknown account Oct 20, 2023 at 8:21 AM
      Code:
      #0 src/addons/vw/vw/_core/model/image/format/vw.php(1065): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/nginx/dom...', 1065)
      #1 src/addons/vw/vw/_core/controller/dm/attach/thumb/vw.php(307): vw_Image_Format_Model->resize(450, 251, 'png')
      #2 src/addons/vw/vw/_core/controller/dm/attach/thumb/vw.php(131): vw_DM_Attach_Thumb_Controller->create_thumbnail('png', Object(vw_Image_Format_PNG_Model), 450, 800)
      #3 src/addons/vw/vw/XF/Entity/EntityBase.php(513): vw_DM_Attach_Thumb_Controller->pre_save(true)
      #4 src/XF/Mvc/Entity/Entity.php(1366): vw\vw\XF\Entity\EntityBase->_preSave()
      #5 src/addons/vw/vw/XF/Entity/EntityBase.php(504): XF\Mvc\Entity\Entity->preSave()
      #6 src/addons/vw/vw/_core/controller/dm/xf2.php(387): vw\vw\XF\Entity\EntityBase->vwPreSave()
      #7 src/addons/vw/vw/_core/controller/asset/vw.php(813): vw_DM_Controller_XF2->pre_save()
      #8 src/addons/vw/vw/_core/controller/asset/vw.php(130): vw_Asset_Controller->create_thumbnail(Array)
      #9 src/addons/vw/vw/Pub/Controller/Wiki/Asset.php(43): vw_Asset_Controller->resolve()
      #10 src/addons/vw/vw/Mvc/Dispatcher.php(30): vw\vw\Pub\Controller\Wiki\Asset->_actionIndex(Object(XF\Mvc\ParameterBag))
      #11 src/addons/vw/vw/Pub/Controller/Wiki/AbstractController.php(26): vw\vw\Mvc\Dispatcher::dispatch(Object(vw\vw\Pub\Controller\Wiki\Asset), 'index', Object(XF\Mvc\ParameterBag))
      #12 src/XF/Mvc/Dispatcher.php(352): vw\vw\Pub\Controller\Wiki\AbstractController->actionIndex(Object(XF\Mvc\ParameterBag))
      #13 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('vw\\vw:Wiki\\Asse...', 'Index', Object(XF\Mvc\RouteMatch), Object(vw\vw\Pub\Controller\Wiki\Asset), NULL)
      #14 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(vw\vw\Pub\Controller\Wiki\Asset), NULL)
      #15 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #16 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
      #17 src/XF.php(524): XF\App->run()
      #18 index.php(20): XF::runApp('XF\\Pub\\App')
      #19 {main}
      Code:
      array(4) {
        ["url"] => string(27) "/wiki-asset/?pid=1089&x=450"
        ["referrer"] => string(53) "https://www.....com/wiki/Black-Gate?amp=1"
        ["_GET"] => array(3) {
          ["/wiki-asset/"] => string(0) ""
          ["pid"] => string(4) "1089"
          ["x"] => string(3) "450"
        }
        ["_POST"] => array(0) {
        }
      }
    Issue Details
    Issue Number 6395
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Attachments
    Status Fixed
    Priority 4 - Warnings / Script Errors
    Affected Version 4.1.7
    Fixed Version 4.1.8
    Milestone (none)
    Software DependencyXenForo 2.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. October 20, 2023 8:22 PM
      pegasus pegasus is offline
      VaultWiki Team
      Oh, you're using Imagick as your image library? This error is suggesting that creating an instance of the Imagick class failed. It is possible that Imagick was updated recently or in a recent version of PHP and our implementation is no longer compatible.

      Please clarify your PHP version, and if you can, the version of your Imagick binary, and if applicable your Imagick PHP extension module version.
      Reply Reply  
    2. October 21, 2023 4:24 AM
      mazzly mazzly is offline
      Junior Member
      I recently changed to using Imagick instead of the "PHP built-in GD image library" so maybe that is related...

      PHP Version 8.1.24
      imagick module version 3.7.0
      Imagick compiled with ImageMagick version ImageMagick 6.9.12-98 Q16 x86_64 18038
      Imagick using ImageMagick library version ImageMagick 6.9.12-98 Q16 x86_64 18038
      Reply Reply  
    3. October 21, 2023 11:07 AM
      mazzly mazzly is offline
      Junior Member
      I switched back to using the "PHP built-in GD image library", and later still got a similar error, so not only related to imagick:

      Code:
      ErrorException: [E_WARNING] Undefined variable $resized src/addons/vw/vw/_core/model/image/format/vw.php:1065
      Code:
      #0 src/addons/vw/vw/_core/model/image/format/vw.php(1065): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/nginx/dom...', 1065)
      #1 src/addons/vw/vw/_core/controller/dm/attach/thumb/vw.php(307): vw_Image_Format_Model->resize(450, 516, 'png')
      #2 src/addons/vw/vw/_core/controller/dm/attach/thumb/vw.php(131): vw_DM_Attach_Thumb_Controller->create_thumbnail('png', Object(vw_Image_Format_PNG_Model), 450, 850)
      #3 src/addons/vw/vw/XF/Entity/EntityBase.php(513): vw_DM_Attach_Thumb_Controller->pre_save(true)
      #4 src/XF/Mvc/Entity/Entity.php(1366): vw\vw\XF\Entity\EntityBase->_preSave()
      #5 src/addons/vw/vw/XF/Entity/EntityBase.php(504): XF\Mvc\Entity\Entity->preSave()
      #6 src/addons/vw/vw/_core/controller/dm/xf2.php(387): vw\vw\XF\Entity\EntityBase->vwPreSave()
      #7 src/addons/vw/vw/_core/controller/asset/vw.php(813): vw_DM_Controller_XF2->pre_save()
      #8 src/addons/vw/vw/_core/controller/asset/vw.php(130): vw_Asset_Controller->create_thumbnail(Array)
      #9 src/addons/vw/vw/Pub/Controller/Wiki/Asset.php(43): vw_Asset_Controller->resolve()
      #10 src/addons/vw/vw/Mvc/Dispatcher.php(30): vw\vw\Pub\Controller\Wiki\Asset->_actionIndex(Object(XF\Mvc\ParameterBag))
      #11 src/addons/vw/vw/Pub/Controller/Wiki/AbstractController.php(26): vw\vw\Mvc\Dispatcher::dispatch(Object(vw\vw\Pub\Controller\Wiki\Asset), 'index', Object(XF\Mvc\ParameterBag))
      #12 src/XF/Mvc/Dispatcher.php(352): vw\vw\Pub\Controller\Wiki\AbstractController->actionIndex(Object(XF\Mvc\ParameterBag))
      #13 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('vw\\vw:Wiki\\Asse...', 'Index', Object(XF\Mvc\RouteMatch), Object(vw\vw\Pub\Controller\Wiki\Asset), NULL)
      #14 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(vw\vw\Pub\Controller\Wiki\Asset), NULL)
      #15 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #16 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
      #17 src/XF.php(524): XF\App->run()
      #18 index.php(20): XF::runApp('XF\\Pub\\App')
      #19 {main}
      Code:
      array(4) {
        ["url"] => string(40) "/wiki-asset/?pid=2109&d=1619508063&x=450"
        ["referrer"] => string(89) "https://www.....com/search/218244/?page=2&q=middle+earth+location&o=relevance"
        ["_GET"] => array(4) {
          ["/wiki-asset/"] => string(0) ""
          ["pid"] => string(4) "2109"
          ["d"] => string(10) "1619508063"
          ["x"] => string(3) "450"
        }
        ["_POST"] => array(0) {
        }
      }
      Reply Reply  
    4. October 22, 2023 12:33 PM
      pegasus pegasus is offline
      VaultWiki Team
      VaultWiki picks the best image manipulation software available through your PHP installation for any given task, since some libraries are better at different kinds of images. It does not care about your XenForo setting. Basically, if you have Imagick installed, it will use it for some images.

      I tried the closest Imagick and PHP versions to what you are using and was unable to reproduce the $resized error using the same image quoted in your error message. I was unable to upgrade ImageMagick past 6.9.12-93 without upgrading my server OS. So I wonder if there is a bug in newer versions, or if you possibly upgraded ImageMagick without rebuilding the PECL extension and it causes errors.

      To force VaultWiki to use GD, you will have to edit src/addons/vw/vw/_core/model/image/format/vw.php. Find:
      Code:
      	public static function supports()
      	{
      AFTER it, add:
      Code:
      return false;
      If this works, then we know something is wrong with how ImageMagick is working on your server, and we'll have to add an easier admin option for VaultWiki.

      The only other thing I can think of is bad sectors on your server's hard disk resulting in corrupt image files. But the image is mostly black which is something that ImageMagick does if certain operations are performed (like sharpening an image to the maximum possible amount). If the hard disk was damaged, I might expect random colors.
      Reply Reply  
    5. October 22, 2023 2:41 PM
      mazzly mazzly is offline
      Junior Member
      After making that change the GIF still fails (not black, but transparent instead) but others seems to work... Have to check a bit closer...

      Also, it seems the resized error hasn't been triggered yet...


      It also seems that large image that wouldn't resize now has thumbnail also...
      Reply Reply  
    6. October 22, 2023 2:53 PM
      pegasus pegasus is offline
      VaultWiki Team
      I am also wondering if your disk partition is almost full, as that could have similar issues. Check your free space in /internal_data/vw_attachments and /internal_data/vw_tmp to make sure. (vw_attachmentfail also fills if disk space was too low). I believe GD uses about 1/2 the disk space to make thumbnails as Imagick (GD can work off images in memory, but Imagick needs a tmp file).
      Reply Reply  
    7. October 22, 2023 2:57 PM
      mazzly mazzly is offline
      Junior Member
      Got 600G available space on the partition that hold internal_data folder so shouldn't be problem there
      Reply Reply  
    8. October 23, 2023 4:07 PM
      pegasus pegasus is offline
      VaultWiki Team
      Marking this one as fixed in the next release, this line will no longer assume $resized exists. In src/addons/vw/vw/_core/model/image/format/vw.php, find all:
      Code:
      unset($resized);
      Replace all with:
      Code:
      if ($resized) unset($resized);
      Reply Reply  
    9. October 24, 2023 8:59 AM
      mazzly mazzly is offline
      Junior Member
      So can I re-enable Imagick support now, or is the timeout still a problem?
      Reply Reply  
    10. October 24, 2023 1:39 PM
      pegasus pegasus is offline
      VaultWiki Team
      I think the timeout is only a problem if you change a setting and trigger a rebuild. If all your images have finally built, then you shouldn't encounter timeouts during regular use, and it should be safe to reenable Imagick support.
      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 2:35 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.