Joomla!
http://forum.joomla.org/

[SOLVED] Events Calendar Error
http://forum.joomla.org/viewtopic.php?f=36&t=6585
Page 1 of 2

Author:  cybersalt [ Sat Sep 17, 2005 9:00 pm ]
Post subject:  [SOLVED] Events Calendar Error

After converting to Joomla 1.0.0, clicking on my main menu link to the events calendar component generates the following error:

Fatal error: Cannot redeclare clone() (previously declared in /data/in/s/salthost/www/includes/compat.php50x.php(9) : eval()'d code:1) in /data/in/s/salthost/www/components/com_events/events.php(545) : eval()'d code on line 2

The events module is still working fine - its just the calendar that won't open.

Author:  cybersalt [ Sat Sep 17, 2005 11:44 pm ]
Post subject:  Re: Events Calendar Error - Solution

I e-mailed Dave McDonell about this (his address is listed on the component) and he replied:

"You can just delete that specific line I believe in the code.  It was put there as a compatibility kludge to php5.  But a month or two later the mambo developers put the same thing into their code which is causing the conflict now."

So I went into components/com_events/events.php and removed the following (lines # 1073-1091):


/* MLr: ugly hack to cope with PHP4/PHP5 differences

* concerning use of references (thanks to http://www.acko.net/node/54)

*/

if (version_compare(phpversion(), '5.0') < 0) {

    eval('

    function clone($object) {

      return $object;

    }

    ');

}



The Events Component is now working for me in Joomla.

Author:  pointri [ Sun Sep 18, 2005 12:51 am ]
Post subject:  Re: [SOLVED] Events Calendar Error

Ah...this was my only hangup so far in the migration.  Thank you!

Author:  Last BoyScout [ Mon Sep 19, 2005 9:37 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

cybersalt wrote:
So I went into components/com_events/events.php and removed the following (lines # 1073-1091):


For me it was commenting out line # 540-546

Author:  JWvanKwawegen [ Fri Sep 23, 2005 12:51 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

Last BoyScout wrote:
cybersalt wrote:
So I went into components/com_events/events.php and removed the following (lines # 1073-1091):


For me it was commenting out line # 540-546


For me too. But it works great. Thanx!!! :D

Author:  youngwilly [ Sun Sep 25, 2005 11:51 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

In have the same problem but I cant edit the events.php file to remove the offending lines of code - the permissions on the file are set to 644 and I cant change them , or the permissions on the com-events folder?

Author:  sc00zy [ Sun Sep 25, 2005 11:53 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

If you can't change the permissions by FTP you can always try MamboXplorer.

Author:  youngwilly [ Mon Sep 26, 2005 12:09 am ]
Post subject:  Re: [SOLVED] Events Calendar Error

wow -you guys are just the best! MamboXplorer did the trick OK, and error is now fixed.

Author:  sc00zy [ Mon Sep 26, 2005 12:14 am ]
Post subject:  Re: [SOLVED] Events Calendar Error

You're very welcome ;D That's what a community is for!

Author:  danne [ Tue Sep 27, 2005 8:11 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

;D
Just have to say thanks, thanks and thanks!

This solved the problem for me too!!!

Author:  rkhanso [ Fri Sep 30, 2005 10:23 am ]
Post subject:  Re: [SOLVED] Events Calendar Error

I'm not having as much success.

I've tried commenting out lines 540-546 by putting a // in front of each line.  Is that the correct way to do that?

I also tried deleting lines 1073-1091 with no success. 

I used MamboXplorer to do the editing.

Author:  rkhanso [ Fri Sep 30, 2005 7:37 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

OK - I've got it working. 

Author:  danne [ Fri Sep 30, 2005 9:29 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

Nice!

What was wrong?

Author:  rkhanso [ Fri Sep 30, 2005 10:38 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

I saw everyone else was removing lines 540-546 or 1073-1091 and I tried removing or commenting those out.  Didn't work.

Well, in my case it was completely different lines.  I don't remember exactly, but it was very near the beginning of the events.php.

I completely ignored WHAT the text was and deleting that and just removed the LINES everyone else was removing.

Once I removed the CORRECT text, it worked. 

Author:  babs [ Sun Oct 02, 2005 9:48 am ]
Post subject:  Re: Events Calendar Error - Solution

cybersalt wrote:
I e-mailed Dave McDonell about this (his address is listed on the component) and he replied:

"You can just delete that specific line I believe in the code.  It was put there as a compatibility kludge to php5.  But a month or two later the mambo developers put the same thing into their code which is causing the conflict now."

So I went into components/com_events/events.php and removed the following (lines # 1073-1091):


/* MLr: ugly hack to cope with PHP4/PHP5 differences

* concerning use of references (thanks to http://www.acko.net/node/54)

*/

if (version_compare(phpversion(), '5.0') < 0) {

    eval('

    function clone($object) {

      return $object;

    }

    ');

}



The Events Component is now working for me in Joomla.



Thankx for your help  ;D
My calender is now working again  :laugh:

Author:  divall [ Thu Oct 06, 2005 3:01 am ]
Post subject:  Re: [SOLVED] Events Calendar Error

Thanks for your help. It work Well

Your support is so quick and efficient.

Thanks a lot to all of you

Divall

Author:  Jing [ Thu Oct 06, 2005 8:48 am ]
Post subject:  Re: [SOLVED] Events Calendar Error

Thank You so much Guys!!!  :laugh:
It really solved my problem too. I even had the permission problem also and followed @sc00zy's suggestion to use MamboXplorer and it worked great!
Thanks a lot!  :laugh: :laugh: :laugh:

Author:  tbmarcom [ Sun Oct 09, 2005 10:18 am ]
Post subject:  Re: [SOLVED] Events Calendar Error

did same like babs,
all went fine now.

this community rocks !"

thx to all


.....peace out

Author:  Vramin [ Mon Oct 10, 2005 5:56 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

I registered just so I could say thank you for posting this fix. :)

Author:  Duco [ Mon Oct 10, 2005 7:40 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

Drove me crazy >:( on a new installation, but did did the trick! :laugh:

Funny, but found this tread tru google -> MamboForge -> link here, that's a way to get people to the right spot!

Duco
(never stop learning)

Author:  Jing [ Tue Oct 11, 2005 6:11 am ]
Post subject:  Re: [SOLVED] Events Calendar Error

I have one problem though... Why is it every time a frontend member/user can't write an event. It has a Java error when they try to write one. The cursor doesn't show up.  :(

Author:  carl_in_florida [ Thu Oct 13, 2005 5:03 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

Last BoyScout wrote:


For me it was commenting out line # 540-546


Me too, thanks all

Carl

Author:  MolBio [ Thu Oct 13, 2005 6:44 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

Thank you,

works just fine now.

Alex

Author:  warmac [ Fri Oct 14, 2005 8:34 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

I have to say though, the Events Component was working for me even with that bit of code but I took it out anyway since everyone else did,

My main problem with events is that when I try to add/edit an event via the admin, the save button which is javascript does not work

If i only type in the title and description and click save it will save it but then when i go to the publishing tab and do a repeat area the save buttion does nothing.

Has anyone else had this trouble in Safari Browser ?

I tested it in Firefox and it works but not in Safari

I also noticed then when i go into the publishing tab and back to the events tab, my description ends up missing

Author:  jacobi [ Mon Oct 17, 2005 11:18 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

Thank you very much for offering this fix.  It really had me "stymied."  I upgraded one site to Joomla! with no problem.  For another site, when I did a fresh install and manually migrated the SQL data, I got the error.  Most curious.

To the point -- I found the text cybersalt describes, but in lines 537-546; not 1073-1091.

Author:  samsoul [ Mon Oct 24, 2005 1:11 pm ]
Post subject:  Re: Events Calendar Error

Sorry but I don't speak english very well ... :-\

Hi,

I installed the Events component on Joomla 1.0 and obtained a erreur.

--------------------------------
Fatal error: Cannot redeclare clone() (previously declared in /home/handisport/domains/handisport26.com/public_html/includes/compat.php50x.php(9) : eval()'d code:1) in /home/handisport/domains/handisport26.com/public_html/components/com_events/events.php(545) : eval()'d code on line 2
--------------------------------

I followed the recommendations (I've find a solution here) and carried out the modifications in events.php.  On my website, when I accede in the calendar, it is indicated that there is no event (but i've got an event) and a message appears: 

----------------------------------
Warning: Division by zero in /home/handisport/domains/handisport26.com/public_html/includes/pageNavigation.php on line 96

Warning: Division by zero in /home/handisport/domains/handisport26.com/public_html/includes/pageNavigation.php on line 97
----------------------------------

What is it???  How to solve this problem?? 
Thank you in advance.

Author:  tijs [ Wed Oct 26, 2005 2:26 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

I never got the Events Calendar to work in my newly installed Joomla 1.0.3.

This is an error I get:

Cannot write to /var/www/vhosts/handsoffvenezuela.org/httpdocs/includes/patTemplate/patTemplate/Function!
Either PatTemplate isn't installed into Mambo or /var/www/vhosts/handsoffvenezuela.org/httpdocs/includes/patTemplate/patTemplate/Function doesn't have the required permissions
Errors occurred during installation!

Everything seems fine and the admin component works, I see the latest events on the homepage etc, but if you click on the latest events it just displays a blank page. I tried both with an existing database and a new one.

It's driving me nuts since there is no other viable latest events component for Joomla available as far as I can see and I can't get this one to work :(

Author:  warmac [ Wed Oct 26, 2005 5:14 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

Yea the same thing happen to me, typical when I install a component if it doesn't work the first time the way its suppose to I classify it as junk and move on to the next component.  You're better off not wasting your time with it if it doesn't work.  You shouldn't have to hack something to death to get it to work.  There will be another event component that will come along soon by someone else that will be better than this one check around for other similiar components.

Author:  bworley61 [ Wed Oct 26, 2005 6:35 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

I just installed extCalendar Component  ( http://mamboforge.net/projects/extcalendar ) onto a fresh install of Joomla  1.0.3 and no problems so far....

Author:  tijs [ Wed Oct 26, 2005 6:48 pm ]
Post subject:  Re: [SOLVED] Events Calendar Error

Yes, after spending about a day in total to get Latest Events to work, I think I will settle down for extCalendar, which indeed just seems to work. I'm just concerned about security: it's beta and anyone can add events.
In a way it is a consolation Latest Events doesn't work for other people either  ;D Pity because I was quite happy with it and it did its job just fine.

Page 1 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/