ghazal / plg_mvcoverride

Joomla plugin to override Joomla MVC
21 stars 18 forks source link

Does not work with joomla 3.3.6 #1

Open nishadk123 opened 9 years ago

nishadk123 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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