plg_mvcoverride icon indicating copy to clipboard operation
plg_mvcoverride copied to clipboard

Joomla 3.4: Cannot redeclare class MailtoController

Open hfittipaldi opened this issue 9 years ago • 3 comments

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() { ... }
}

hfittipaldi avatar Mar 10 '15 19:03 hfittipaldi

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.

ghazal avatar Mar 12 '15 17:03 ghazal

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?

rkorzeniec avatar May 22 '15 11:05 rkorzeniec

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

aletayeb avatar May 26 '15 08:05 aletayeb