[NOT A BUG] 2.1.5 - Cannot declare class Truonglv\Groups\XFMG\Pub\Controller\XFCP_Album

janslu

Member
I have just uploaded 2.1.5 and get the following errors on XF media pages:

Code:
Server error log
ErrorException: [E_WARNING] Cannot declare class Truonglv\Groups\XFMG\Pub\Controller\XFCP_Album, because the name is already in use src/XF/Extension.php:169
Wygenerowane przez: Nieznane konto 2 Luty 2020 o 11:41
Stack trace
#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] Can...', '/var/www/hosts/...', 169, Array)
#1 src/XF/Extension.php(169): class_alias('Truonglv\\Groups...', 'Truonglv\\Groups...')
#2 src/XF/App.php(2668): XF\Extension->extendClass('XFMG\\Pub\\Contro...', NULL)
#3 src/XF/App.php(1472): XF\App->extendClass('XFMG\\Pub\\Contro...')
#4 src/XF/Container.php(228): XF\App->XF\{closure}('XFMG\\Pub\\Contro...', Array, Object(XF\Container))
#5 src/XF/App.php(2623): XF\Container->create('controller', 'XFMG:Album', Array)
#6 src/XF/Mvc/Dispatcher.php(289): XF\App->controller('XFMG:Album', Object(XF\Http\Request))
#7 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XFMG:Album', 'index', Object(XF\Mvc\RouteMatch), NULL, NULL)
#8 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), NULL, NULL)
#9 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#11 src/XF.php(391): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(43) "/forum/media/albums/kamis.3591/?order=likes"
  ["referrer"] => bool(false)
  ["_GET"] => array(2) {
    ["/forum/media/albums/kamis_3591/"] => string(0) ""
    ["order"] => string(5) "likes"
  }
  ["_POST"] => array(0) {
  }
}
 

janslu

Member
Same for another class:
Code:
ErrorException: [E_WARNING] Cannot declare class Truonglv\Groups\XFMG\Pub\Controller\XFCP_Media, because the name is already in use src/XF/Extension.php:169
 

janslu

Member
Aaaannddd another one: ErrorException: [E_WARNING] Cannot declare class Truonglv\Groups\XF\Admin\Controller\XFCP_Option, because the name is already in use in src/XF/Extension.php at line 169
 

janslu

Member
Just to follow up - turned out it was a crashed table ('xf_class_extension') in the db. Truonglv helped me and everything is resolved. Updating Social groups triggered the problem and added second records where there only should be one (unique index wasn't working).
 
Top