Tuesday 19 May 2009 3:05:34 pm
I'm using eZ 4.0.1 and downloaded xajax from the following url ("Downloads" in the main menu of this site):
Fatal error: Cannot redeclare class xajaxRequestPlugin in C:\ws\myproject\extension\xajax\lib\xajax\xajax_core\xajaxPlugin.inc.php on line 102
Fatal error: eZ Publish did not finish its request
The execution of eZ Publish was abruptly ended, the debug output is present below.
I also tried to regenerate autoloads and clear cache several times. And I also tried to use the latest version from the svn (http://svn.projects.ez.no/ezxajax/trunk/extension/ezxajax/) It is named ezxajax instead of xajax, but generated the same error.
I'm not sure if this might be a problem the starrating extension, but It looks more like a xajax problem to me.
Thank you for any help!!
Monday 01 June 2009 8:41:29 am
I've installed starrating and ezxajax from the svn of the projects site have have not been able to reproduce your error.
Given the nature of the error it would appear that an xajax library is being included twice. I'm wondering if this is an issue with autoload and possibly having multiple copies of xajax on the system. I'm thinking this may be something either specific to your particular installation or to php/eZpublish/xajax under windows.
Are you able to check if there are multiple files hat define the xajaxRequestPlugin class?
The Star Rating extension does not include any xajax files - it simply checks to see if it is available and utilises it if it can.
Kristof has supplied some patches to the Star Rating extension but they do not appear to address your specific error.
What other extensions do you have enabled?
Wednesday 10 June 2009 9:57:10 am
Sorry for answering so late, I have been ill for 2 weeks :(
Back to the problem:
I don't have multiple copies of the xajax libs. I greped for "xajaxRequestPlugin" in the whole project, and found only one file where its defined. So it seems that the same file is included twice for some reason.
I tried the patches by Kristof, but they don't solve problem.
I have the following extensions:
And also a few extensions developed by myself, but none of them uses xajax, or should conflict with it in any way
I'll try if it works under linux later and report that. When I find time, I'll also try it on a totally fresh eZ installation
Tuesday 16 June 2009 1:40:06 pm
I tried on a linux server and the error does not occur there!! So it really seems to be windows specific! The "Cannot redeclare class xajaxRequestPlugin" error does NOT happen under linux. Starrating + xajax work perfectly now.
But for development I'am using Windows Vista + xampp 1.6.6a + php 5.2.5.
On that system the error still exists!!
I also noticed that the error only happens with the starrating extension. The xajax hello world example works well under linux and windows.
But the combination windows/xampp + ezxajax + starrating breaks the whole thing resulting in the "Cannot redeclare class xajaxRequestPlugin" error.
I have been developing on that system for almost a year now, but I never had any platform specific problems with any extensions or autoload issues before, so I don't think my xampp configuration is messed up.
So far I can ignore the error as I know that it will work on the production system, but of course it would be nice if we could solve that.
I hope this helps. Thank you!