Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joomla 3.4: Cannot redeclare class MailtoController #3

Open
hfittipaldi opened this issue Mar 10, 2015 · 3 comments
Open

Joomla 3.4: Cannot redeclare class MailtoController #3

hfittipaldi opened this issue Mar 10, 2015 · 3 comments

Comments

@hfittipaldi
Copy link
Contributor

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() { ... }
}
@ghazal
Copy link
Owner

ghazal commented Mar 12, 2015

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.

@rkorzeniec
Copy link

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?

@aletayeb
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants