Home Forums ePix Support Mobile Detect causing fatal error in ePix

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #48742


    Hi Tom, Andy,

    Since updating the ePix theme last night I’ve been getting this message.

    Fatal error: Cannot redeclare class Mobile_Detect in /home/wideeyedev/clients.wide-eyedesign.com/WideEyedDesign/wp-content/themes/WideEyedDesign/lib/adm/functions/Mobile_Detect.php on line 27

    I did have a look at the Mobile_Detect.php page in Dreamweaver and also did a bit of hunting on the WordPress help forum but there was nothing there that made any sense to me – the code fix I tried just put the syntax completely wrong and I don’t know enough PHP to make it right!


    best wishes


    PS. I can log into the admin area of my site with no problems – let me know if you need to take a look and I’ll set up an username etc


    Tom ( Support)

    Hi Heli,

    It looks like a plugin and theme are declaring the same class, you can resolve it by editing ePix/lib/inc/page-constants.php and change this line.

    require_once NV_FILES . '/adm/functions/Mobile_Detect.php';


    if( !class_exists( 'Mobile_Detect' ) )
    require_once NV_FILES . '/adm/functions/Mobile_Detect.php';

    Kind regards,

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

© 2019 Acoda