plg_mvcoverride
plg_mvcoverride copied to clipboard
Joomla 3.4: Cannot redeclare class MailtoController
In Joomla 3.4 on 'Send email to a friend' receiving the following error:
Fatal error: Cannot redeclare class MailtoController in /components/com_mailto/controller.php on line 163
On my code/com_mailto/controller.php:
class MailtoController extends JControllerLegacy { function mailto() { ... } function send() { ... } }
Hello, with Make extendable and Change functions on Yes, try to change the name of your class. Like : class DefaultMailtoController extends JControllerLegacy
And modify your functions to your wishes as well, as it is the goal here. Let me know if it works.
Hi there,
I came across the same problem. I am trying to override the Mailto controller. I have installed the plugging and followed your advice ghazal to rename the class to:
class DefaultMailtoController extends JControllerLegacy
That did not work, it is just ignored and the original controller is in use. Any other suggestions?
hi I would override component com_jcomments ,but print the following error: Fatal error: Cannot redeclare class JCommentsModel in C:\wamp\www\joomla3.3.6\components\com_jcomments\models\jcomments.php on line 18 line 18 is start declare class JCommentsModel { please help me! Thank you