Forums / Extensions / Duplicate php classes in extensions

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Duplicate php classes in extensions

Author Message

Kostadinka Ignatieva

Thursday 25 June 2009 6:32:48 am

Hi,

I have the following problem in a project. In two of the used extensions (ezcore and ezmultiupload) there is a definition of the same php class (eZAjaxContent). After I run autoloads script, I get the following warning:

Warning:
Class eZAjaxContent in file extension/ezmultiupload/classes/ezajaxcontent.php is already defined in:
extension/ezcore/classes/ezajaxcontent.php (var/autoload/ezp_extension.php)
This class was not added to the autoload array.

The two php files, however, are the same (just some slight differences in comments), so this is not a problem for the extensions, at least for now, but I would really want to know what is best to be done in such cases.

Thanks!
Regards

Iguana IT - http://www.iguanait.com

Łukasz Serwatka

Thursday 25 June 2009 6:37:10 am

Hi,

This is one of the cases where we should use a prefixes for a content class names...
I would check if the classes are exactly the same, if so then remove one and update the autoload array.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Kostadinka Ignatieva

Thursday 25 June 2009 6:53:55 am

Thanks for the quick reply!
I will follow your advice.

Iguana IT - http://www.iguanait.com