1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Cannot redeclare class XFCP_ eval()'d code

Discussion in 'Troubleshooting and Problems' started by laudi, Sep 26, 2016.

  1. laudi

    laudi New Member

    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.
    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
    static private $dynamicClasess = Array(); //added
    public static function resolveDynamicClass($class$type ''$fakeBase false) {
    // changed code (eval and )
    if(!in_array($proxyClassself::$dynamicClasess)) {
    self::$dynamicClasess[] = $proxyClass;
    $namespaceEval 'class ' $proxyClass ' extends ' $createClass ' {}');  
    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
  2. James

    James Well-Known Member

    Unfortunately any compatibility issues between add-ons should primarily be sorted between the add-on authors (in this case @Nobita.Kun & @Contex

    I'm not sure how active Contex is but you could submit an issue on Github and see if it gets a response.

    This also may need moving to development help if it's self-fixing an add-on bug.
  3. Chris D

    Chris D XenForo Developer Staff Member

    We're unable to provide support for third party add-ons and there appears to be two add-ons involved here.

    If you're unhappy with the support you've received for a paid add-on, or generally need support for any add-on, you should contact the author for that support. The authors of the two add-ons might even need to work together to find a solution.

Share This Page