Jump to content

Overriding core classes conflict


omarkohl
 Share

Recommended Posts

I'm writing a Module where I overwrite core classes (by copying them into the override directory). I was just wondering what would happen if I were to install another module where those same core classes were overriden. My first module would (possibly silently) stop working. This seems a rather big issue to me. Any ideas on how to solve this?

Share this post


Link to post
Share on other sites

yea quite the issue :)

one thought is to create a hash of the class you created and supplied with your module and placed in the override folder.
then have your module check the hash of the file and present some kind of alert or warning to the webmaster, or maybe even disable your module functionality if that is possible.

Share this post


Link to post
Share on other sites

The hash idea is quite original. I hadn't thought of that. Still it looks to me like a pretty big design flaw that should be "solvable" in a more general way.
Making the override folder not writable is a simple way to stop silent functionality loss. Do you really thoroughly review the code of every module you install? I usually asume that modules I want to install will work out of the box if I read the users manual (of course I mean common and popular modules by companies or programmers with high reputation).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More