plg_mvcoverride icon indicating copy to clipboard operation
plg_mvcoverride copied to clipboard

Does not work with joomla 3.3.6

Open nishadk123 opened this issue 10 years ago • 11 comments

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!

nishadk123 avatar Dec 02 '14 10:12 nishadk123

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.

ghazal avatar Dec 02 '14 11:12 ghazal

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.

nishadk123 avatar Dec 02 '14 12:12 nishadk123

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.

ghazal avatar Dec 02 '14 13:12 ghazal

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?

nishadk123 avatar Dec 02 '14 13:12 nishadk123

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 ?

ghazal avatar Dec 02 '14 14:12 ghazal

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 avatar Dec 02 '14 14:12 nishadk123

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!!

nishadk123 avatar Dec 03 '14 15:12 nishadk123

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.

ghazal avatar Dec 03 '14 16:12 ghazal

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?

alearau avatar Dec 22 '14 18:12 alearau

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.

fly1ted avatar Apr 07 '15 17:04 fly1ted

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 07:05 aletayeb