Resource icon

[bd] Widget Framework 2.6.6

No permission to download
The widget blocks in widget page make no sense to me. Can someone please explain me what the size and position number mean?
The widget can span more than one column or row (size numbers).
And can be put in the grid by position numbers.
Hope it makes more sense now?
 
The widget can span more than one column or row (size numbers).
And can be put in the grid by position numbers.
Hope it makes more sense now?
1. position is column right, and second position is position inside column
1. size is number (span) of columns ? and second size?

sizw.webp
 
We upgraded to 2.3.5 and since then we get lots of errors
PHP:
XenForo_Exception: Cannot load class using XFCP. Load the class using the correct loader first. - library/XenForo/Autoloader.php:108
PHP:
#0 [internal function]: XenForo_Autoloader->autoload('XFCP_WidgetFram...')
#1 /home/admin/domains/example.com/public_html/library/WidgetFramework/XenForo/View1.php(4): spl_autoload_call('XFCP_WidgetFram...')
#2 /home/admin/domains/example.com/public_html/library/XenForo/Autoloader.php(119): include('/home/admin/dom...')
#3 /home/admin/domains/example.com/public_html/library/XenForo/Application.php(959): XenForo_Autoloader->autoload('WidgetFramework...')
#4 /home/admin/domains/example.com/public_html/library/XenForo/Application.php(483): XenForo_Application::autoload('WidgetFramework...')
#5 /home/admin/domains/example.com/public_html/library/XenForo/ViewRenderer/Abstract.php(209): XenForo_Application::resolveDynamicClass('', 'view', 'XenForo_ViewPub...')
#6 /home/admin/domains/example.com/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(67): XenForo_ViewRenderer_Abstract->renderViewObject('', 'Html', Array, 'limit_guest_inf...')
#7 /home/admin/domains/example.com/public_html/library/XenForo/FrontController.php(572): XenForo_ViewRenderer_HtmlPublic->renderView('', Array, 'limit_guest_inf...', NULL)
#8 /home/admin/domains/example.com/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#9 /home/admin/domains/example.com/public_html/index.php(13): XenForo_FrontController->run()
#10 {main}

Errors can be found in the Server log page
 
Last edited:
XenForo_Exception: Cannot load class using XFCP. Load the class using the correct loader first. - library/XenForo/Autoloader.php:108
Generated By: Mari, Yesterday at 11:12 PM
Stack Trace
#0 [internal function]: XenForo_Autoloader->autoload('XFCP_WidgetFram...') #1 /home/blah/public_html/library/WidgetFramework/XenForo/View1.php(4): spl_autoload_call('XFCP_WidgetFram...') #2 /home/blah/public_html/library/XenForo/Autoloader.php(119): include('/home/blah/publi...') #3 /home/blah/public_html/library/XenForo/Application.php(959): XenForo_Autoloader->autoload('WidgetFramework...') #4 /home/blah/public_html/library/XenForo/Application.php(483): XenForo_Application::autoload('WidgetFramework...') #5 /home/blah/public_html/library/XenForo/ViewRenderer/Abstract.php(209): XenForo_Application::resolveDynamicClass('', 'view', 'XenForo_ViewPub...') #6 /home/blah/public_html/library/XenForo/ViewRenderer/Json.php(88): XenForo_ViewRenderer_Abstract->renderViewObject('', 'Json', Array, 'blah_onlineusers...') #7 /home/blah/public_html/library/XenForo/FrontController.php(572): XenForo_ViewRenderer_Json->renderView('', Array, 'blah_onlineusers...', NULL) #8 /home/blah/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_Json), Array) #9 /home/blah/public_html/index.php(13): XenForo_FrontController->run() #10 {main}
Request State
array(3) { ["url"] => string(32) "http://8thos.com/blah_onlineuser/" ["_GET"] => array(0) { } ["_POST"] => array(4) { ["_xfRequestUri"] => string(1) "/" ["_xfNoRedirect"] => string(1) "1" ["_xfToken"] => string(8) "********" ["_xfResponseType"] => string(4) "json" } }
I experience the same error since upgrading:

XenForo_Exception: Cannot load class using XFCP. Load the class using the correct loader first. - library/XenForo/Autoloader.php:108


XF 1.2, installed manually.
 
Last edited:
I have found a bug in XenForo, reported here http://xenforo.com/community/threads/resolvedynamicclass-when-class-is-empty.57064/
The problem is some other add-on left view class name blank and triggered the above bug. I will provide a temporary fix in this post and hope XenForo will fix the bug soon enough.

Temporary fix:
File: xenforo/library/WidgetFramework/Listener.php
Line: 169 (as of v2.3.5)
PHP:
public static function load_class_view($class, array &$extend)
{

Replace with

PHP:
public static function load_class_view($class, array &$extend)
{
if (empty($class))
{
return;
}
 
I had to revert back to 2.3.4 even with the empty class "fix", we were seeing tons of errors related to TaigaChat that broke our XenPorta front page like: "PHP Fatal error: Undefined class constant 'PARAM_POSITION_CODE' in /blah/htdocs/library/WidgetFramework/Listener.php on line 54"
 
  • Like
Reactions: DRE
I had to revert back to 2.3.4 even with the empty class "fix", we were seeing tons of errors related to TaigaChat that broke our XenPorta front page like: "PHP Fatal error: Undefined class constant 'PARAM_POSITION_CODE' in /blah/htdocs/library/WidgetFramework/Listener.php on line 54"
That error means you haven't reverted successfully. That constant first appear in v2.3.5. I suggest you use v2.3.5 though. If you still have trouble with it, I can help upgrading. Start a conversation with me.

"Added support for view object in widget rendering"

What is this, I cannot find anything new in admin about this?
This is a behind the scene change for future renderers ;)
 
That error means you haven't reverted successfully. That constant first appear in v2.3.5. I suggest you use v2.3.5 though. If you still have trouble with it, I can help upgrading. Start a conversation with me.

Sorry, I wasn't clear. I was getting that error ON V2.3.5, so I reverted back to V2.3.4 and all is well for the time being. Normally I don't deploy new code on Fridays but I got the email and went for it.. ;)

I've got to update my dev environment to 1.2 and get some fresh data on there so I can test this out before I go upgrading again.
 
v2.3.5 fixed that bug ;)

Excellent thanks.

Can I just ask, is it possible to specify a widget to only appear in a hook position on a certain template.

Say I want something to appear on my EWR_portal template in the above_content hook position.

Currently if I add the template name it'll appear in the sidebar, if I add the hook name it'll appear in above_content on every page. Is there a way to specify BOTH hook and template?
 
Excellent thanks.

Can I just ask, is it possible to specify a widget to only appear in a hook position on a certain template.

Say I want something to appear on my EWR_portal template in the above_content hook position.

Currently if I add the template name it'll appear in the sidebar, if I add the hook name it'll appear in above_content on every page. Is there a way to specify BOTH hook and template?
On Expression field:
Code:
in_array($contentTemplate, array(
'EWR_portal'
))
or
Code:
!in_array($contentTemplate, array(
'EWR_portal','Other_TemplateClass'
))

Position:
Code:
hook:ad_above_content
 
Last edited:
Top Bottom