diff --git a/supercache.controller.php b/supercache.controller.php index 604974a..7dece75 100644 --- a/supercache.controller.php +++ b/supercache.controller.php @@ -95,6 +95,14 @@ public function triggerAfterModuleHandlerInit($obj) { $this->fillPageVariable($obj, $config); } + + // Register autoloaders for documentItem and commentItem, because some versions of XE fail to autoload them. + spl_autoload_register(function($class) { + if (preg_match('/^(document|comment)item$/', strtolower($class), $matches)) + { + include_once sprintf('%1$smodules/%2$s/%2$s.item.php', _XE_PATH_, $matches[1]); + } + }); } /**