VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: hoknight on September 22, 2015, 05:12:25 AM

Title: Fatal error: Cannot redeclare virtuemartBuildRoute() (previously declared in ...
Post by: hoknight on September 22, 2015, 05:12:25 AM
Hi,

Front-end Error message:
Fatal error: Cannot redeclare virtuemartBuildRoute() (previously declared in /home/.../domains/.../public_html/prototype/components/com_virtuemart/router.php:23) in /home/.../domains/.../public_html/prototype/components/com_tcpdf/router.php on line 293

Any one can help how to fix this issues?

Virtuemark 3.0.9.10
Joomla 3.4.4

Thanks.
Title: Re: Fatal error: Cannot redeclare virtuemartBuildRoute() (previously declared in ...
Post by: jenkinhill on September 22, 2015, 11:55:35 AM
Are you using the current version of com_tcpdf?   http://dev.virtuemart.net/attachments/download/896/com_tcpdf_1.0.0.zip

I assume that you are actually using VM3.0.10 ?
Title: Re: Fatal error: Cannot redeclare virtuemartBuildRoute() (previously declared in ...
Post by: hoknight on September 22, 2015, 12:22:58 PM
I have tried to uninstall Virtuemark and reinstall VM3.0.10 .However, I can't open the Virtuemark again.
Error message are the same in front-end.
Title: Re: Fatal error: Cannot redeclare virtuemartBuildRoute() (previously declared in ...
Post by: Milbo on September 22, 2015, 14:47:09 PM
Never reinstall (uninstall and install), use always the normal update method, that means, just install it again.
Title: Re: Fatal error: Cannot redeclare virtuemartBuildRoute() (previously declared in ...
Post by: hoknight on September 22, 2015, 16:31:50 PM
So,What should I do right now?

please advise.

Title: Re: Fatal error: Cannot redeclare virtuemartBuildRoute() (previously declared in ...
Post by: jenkinhill on September 22, 2015, 17:25:16 PM
option=com_tcpdf and option=com_virtuemart_allinone should return a 404 as they are "empty" components.

If you have used the correct com_tcpdf component then the directory components/com_tcpdf/ should be empty - it should not contain router.php so if that file is present then I suggest you rename it, eg to router.xxx
Title: Re: Fatal error: Cannot redeclare virtuemartBuildRoute() (previously declared in ...
Post by: Milbo on September 23, 2015, 08:49:46 AM
Quote from: jenkinhill on September 22, 2015, 17:25:16 PM
option=com_tcpdf and option=com_virtuemart_allinone should return a 404 as they are "empty" components.

Correct for the tcpdf, but wrong for the allinone. The allinone shows all vm related extensions.
Title: Re: Fatal error: Cannot redeclare virtuemartBuildRoute() (previously declared in ...
Post by: hoknight on September 23, 2015, 09:21:03 AM
VirtueMart working fine again after renamed the router.php file.

Thanks.
Title: Re: Fatal error: Cannot redeclare virtuemartBuildRoute() (previously declared in ...
Post by: jenkinhill on September 23, 2015, 10:33:58 AM
Quote from: Milbo on September 23, 2015, 08:49:46 AM
wrong for the allinone. The allinone shows all vm related extensions.

On a fresh VM3.0.10 install on J3.4.4 administrator/index.php?option=com_virtuemart_allinone returns a 404. But yes, it does contain some content.
Title: Re: Fatal error: Cannot redeclare virtuemartBuildRoute() (previously declared in ...
Post by: Milbo on September 24, 2015, 10:11:10 AM
Jenkin this is an error, I was never able to reproduce.