• 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
    • Declaration of vw_WidgetFramework_WidgetRenderer

    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: Declaration of vw_WidgetFramework_WidgetRenderer

    • Issue Tools
      • View Changes
    1. issueid=4523 January 18, 2016 4:01 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Declaration of vw_WidgetFramework_WidgetRenderer

      On adding a new widget in widget framework in WF2.6:

      Server Error Log
      Error Info
      Code:
      ErrorException: Declaration of vw_WidgetFramework_WidgetRenderer::render() should be compatible with WidgetFramework_WidgetRenderer::render(array &$widgetRef, $positionCode, array $params, XenForo_Template_Abstract $template, &$output) - library/vw/WidgetFramework/WidgetRenderer.php:228
      Generated By: alfa, A moment ago
      
      Stack Trace
      #0 /library/XenForo/Autoloader.php(119): XenForo_Application::handlePhpError(2048, 'Declaration of ...', '/...', 228, Array)
      #1 /library/XenForo/Autoloader.php(119): XenForo_Autoloader::autoload()
      #2 /library/XenForo/Application.php(1050): XenForo_Autoloader->autoload('vw_WidgetFramew...')
      #3 /library/XenForo/Application.php(465): XenForo_Application::autoload('vw_WidgetFramew...')
      #4 /library/WidgetFramework/WidgetRenderer.php(829): XenForo_Application::resolveDynamicClass('vw_WidgetFramew...', 'widget_renderer')
      #5 /library/WidgetFramework/Core.php(679): WidgetFramework_WidgetRenderer::create('vw_WidgetFramew...')
      #6 /library/WidgetFramework/ControllerAdmin/Widget.php(620): WidgetFramework_Core::getRenderer('vw_WidgetFramew...')
      #7 /library/WidgetFramework/ControllerAdmin/Widget.php(111): WidgetFramework_ControllerAdmin_Widget->_getRenderersList()
      #8 /library/WidgetFramework/ControllerAdmin/Widget.php(85): WidgetFramework_ControllerAdmin_Widget->_getResponseAddOrEdit(Array, Array)
      #9 /library/XenForo/FrontController.php(351): WidgetFramework_ControllerAdmin_Widget->actionAdd()
      #10 /library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
      #11 /admin.php(13): XenForo_FrontController->run()
      #12 {main}
      Request State
      array(3) {
        ["url"] => string(50) " /admin.php?widgets/add"
        ["_GET"] => array(1) {
          ["widgets/add"] => string(0) ""
        }
        ["_POST"] => array(0) {
        }
      }
    Issue Details
    Issue Number 4523
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Forum Posts / Non-Wiki Content
    Status Fixed
    Priority 4 - Warnings / Script Errors
    Affected Version 4.0.8
    Fixed Version 4.0.9
    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. January 18, 2016 4:04 PM
      pegasus pegasus is offline
      VaultWiki Team
      This is a Strict Standards error. It does not prevent execution of the page.

      However, it looks like Widget Framework changed the renderer signature in a recent version. This is unfortunate, since the change breaks all widgets that other add-ons have created, and Widget Framework does intend for other add-ons to create widgets.

      The only way around this is to create two versions of the class: one for versions before the change was made, and one for newer versions. But I will need to know from the developer the exact version number of the framework when the signature of the ::render method was changed, and the author's intended programmatic way of detecting that version, ideally without queries (I cannot find a version constant on the Core class). If signatures of other methods are changed, I would need to know the versions of those as well.

      EDIT: I checked the current public release (2.5.9) and it still uses the old signature.

      In the mean time, you can edit library/vw/WidgetFramework/CodeEventListener.php, and comment out this line:
      Code:
      $renderers[] = 'vw_WidgetFramework_WidgetRenderer';
      After doing that, you will not be able to deal with VaultWiki widgets in Widget Framework. It seems like there has been a massive update, and the signature of the render method might be the tip of the iceberg.
      Reply Reply
    2. January 19, 2016 7:44 AM
      Alfa1 Alfa1 is offline
      Distinguished Member
      xfrocks is less active on xenforo.com and most activity is now on https://xfrocks.com
      This is also where the latest versions are. Latest version (2.6) is here: https://xfrocks.com/resources/bd-widget-framework.19/
      Reply Reply
    3. January 19, 2016 10:06 AM
      pegasus pegasus is offline
      VaultWiki Team
      Unfortunately xfrocks.com does not appear to be accepting new registrations. I cannot signup. If you could just ask the author the best way for add-ons to detect whether WidgetFramework is version 2.5 or 2.6, then we will be able to make a solution for this. Comparing the code between the versions, there doesn't seem to be a way that jumps out at me.
      Reply Reply
    4. February 1, 2016 10:23 AM
      pegasus pegasus is offline
      VaultWiki Team
      This will be resolved in 4.0.9.
      Reply Reply
    5. February 1, 2016 3:17 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Great. Could you provide me with the fix/patch/build or is 4.0.9 coming soon?
      Reply Reply
    6. February 2, 2016 12:35 PM
      pegasus pegasus is offline
      VaultWiki Team
      Until 4.0.9 you can prevent such errors by disabling the renderer. Comment the relevant line in library/vw/WidgetFramework/CodeEventListener.php:
      Code:
      $renderers[] = 'vw_WidgetFramework_WidgetRenderer';
      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 11:39 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 © 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.