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

Does not work with joomla 3.3.6 #1

Open
nishadk123 opened this issue Dec 2, 2014 · 11 comments
Open

Does not work with joomla 3.3.6 #1

nishadk123 opened this issue Dec 2, 2014 · 11 comments

Comments

@nishadk123
Copy link

Hello Ghazal,

Thanks for the lovely plugin. It will give joomla the flexibility to core what other CMSs have.

I have an issue:

  1. I placed the module override code folder in template_name/code/modules/module_name/helper.php file, is the location correct? does the class needs to be extended? I did not find any documentation for the module overrides

Looking forward to your kind help!

@ghazal
Copy link
Owner

ghazal commented Dec 2, 2014

Hi, thank you for your interest.
Your path is wrong. It should be :

template_name/code/module_name/helper.php 

Just like components.
I'll add this in the ReadMe.
No, the class doesn't need to be extended. It 's just an option.
The end of the article in docs that is mentionned (http://docs.joomla.org/How_to_override_the_component_mvc_from_the_Joomla!_core ) explains how to to override a class.

@nishadk123
Copy link
Author

Hi Ghazal,

Thanks for your quick response. Truely appreciated!!

I have it in the same path now, but with no effect. The control does not even go into the helper.php file there. Will it be possible to provide the readme soon?

I have installed the plugin here from Github. Joomla version is 3.3.6. I am using t3 framework, can that be an issue?

UPDATE:
I tried on another joomla installation without t3 framework. But the same issue there.

@ghazal
Copy link
Owner

ghazal commented Dec 2, 2014

Thanks to you !
I found a line missing in this version.
In mvcoverride.php
just add this :

jimport('joomla.filesystem.file');

under :

jimport('joomla.filesystem.folder');

Check if it's corrected before downloading the new version.
I am relieved it is not a template related issue.
Checked with protostar, yootheme and T3 templates.

@nishadk123
Copy link
Author

Ghazal,
I tried installing the latest updated version of the plugin.
The changes i make in the file my_template/code/module_name/helper.php, do not work.

To test i tried to echo a simple string and exit the control to see if that file is being invoked.
Would be glad to get some help. Do you think i am missing out on any settings?

@ghazal
Copy link
Owner

ghazal commented Dec 2, 2014

OK.
Try this simple step -> Uninstall/remove and reinstall the plugin.
What is the module your are seeking to override ?
And what part are you trying to override ?

@nishadk123
Copy link
Author

I did try uninstalling and reinstalling the plugin.
The two parameters in the admin section are also tried to all permutations and combinations.

Now , i tried to override the com_content/controller.php
Class name is ContentController extends ContentControllerDefault as per the documentation.
I am getting Fatal error: Class 'DatabaseException' not found in /var/www/t3/plugins/system/mvcoverride/mvcoverride.php on line 109

Module is http://extensions.joomla.org/extensions/photos-a-images/slideshow/image-jquery-slideshow/21300
I am trying to override getImages function from helper.php of the module.

@nishadk123
Copy link
Author

Hi Ghazal,

any luck figuring the issue out? I tried a few things again but that didnt help either.
If you dont mind i can help you replicate and fix the bug, as i really want this plugin to work to the rescue of all the joomla developers out there.

Looking forward to you response.

Thank you!!

@ghazal
Copy link
Owner

ghazal commented Dec 3, 2014

Sorry for the late reply.
And thank you for being thorough.
Try the most recent recent version, the DatabaseException error is corrected, over all, the plugin is working, but come back check again. We are still working on some issues.

@alearau
Copy link

alearau commented Dec 22, 2014

Hello Ghazal.
I tried to override the com_mailto component in Joomla 3.3.6, but when I click on frontend to display pop-up with the form, print the following error:
Fatal error: Cannot redeclare class MailtoController in /joomlapath/components/com_mailto/controller.php on line 157
Testing with another component (com_search for example) the error does not occur.
The error indicates that Joomla is trying to load the component again, but from what I understand this should not happen as it should load only once, right?
Could you help me?

@fly1ted
Copy link

fly1ted commented Apr 7, 2015

Hi,

If used for a module does it mean to override a module's standard helper.php, for example in the case of mod_tags_similar it would be ModTagssimilarHelper class, is that right? If so, it doesn't work. I'll provide more info on your response.

@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

5 participants