laudi
Member
Hello,
we are trying to move on xenforo from vbulletinu. Building new forum based on xenforo we encountered an error with api and [Nobita] Social Groups.
Nobita replied only:
I would add that without [Nobita] Social Groups everything works properly.
Fatal error: Cannot redeclare class XFCP_Nobita_Teams_XenForo_Model_Thread in [...]/public_html/library/XenForo/Application.php(528) : eval()'d code on line 1
Our Solution
Call stack
{main}( ) .../api.php:0
RestAPI->processRequest( ) .../api.php:56
XenAPI->search( ) .../api.php:3244
XenForo_Search_Searcher->searchGeneral( ) .../api.php:3434
XenForo_Model_Search->getViewableSearchResults( ) .../Searcher.php:82
XenForo_Model_Search->getViewableSearchResultData( ) .../Search.php:331
XenForo_Search_DataHandler_Thread->getDataForResults( ) .../Search.php:297
XenForo_Search_DataHandler_Thread->_getThreadModel( ) .../Thread.php:142
XenForo_Model::create( ) .../Thread.php:227
XenForo_Application::resolveDynamicClass( ) .../Model.php:189
Is anyone able to help us solve this problem?
ps. sorry for my bad English
we are trying to move on xenforo from vbulletinu. Building new forum based on xenforo we encountered an error with api and [Nobita] Social Groups.
Nobita replied only:
which is not very helpful, in our case the forum is only a part of service of and we need api.Just disable the add-on XenAPI then try again
I would add that without [Nobita] Social Groups everything works properly.
Fatal error: Cannot redeclare class XFCP_Nobita_Teams_XenForo_Model_Thread in [...]/public_html/library/XenForo/Application.php(528) : eval()'d code on line 1
Our Solution
PHP:
static private $dynamicClasess = Array(); //added
public static function resolveDynamicClass($class, $type = '', $fakeBase = false) {
// changed code (eval and )
if(!in_array($proxyClass, self::$dynamicClasess)) {
self::$dynamicClasess[] = $proxyClass;
eval($namespaceEval . 'class ' . $proxyClass . ' extends ' . $createClass . ' {}');
XenForo_Application::autoload($dynamicClass);
}
Call stack
{main}( ) .../api.php:0
RestAPI->processRequest( ) .../api.php:56
XenAPI->search( ) .../api.php:3244
XenForo_Search_Searcher->searchGeneral( ) .../api.php:3434
XenForo_Model_Search->getViewableSearchResults( ) .../Searcher.php:82
XenForo_Model_Search->getViewableSearchResultData( ) .../Search.php:331
XenForo_Search_DataHandler_Thread->getDataForResults( ) .../Search.php:297
XenForo_Search_DataHandler_Thread->_getThreadModel( ) .../Thread.php:142
XenForo_Model::create( ) .../Thread.php:227
XenForo_Application::resolveDynamicClass( ) .../Model.php:189
Is anyone able to help us solve this problem?
ps. sorry for my bad English