Error after adding calendar to my site

Support for the WordPress Calendar plugin
jbaldwin
Posts: 4
Joined: Mon Jul 27, 2009 11:21 pm

Error after adding calendar to my site

Unread post by jbaldwin » Mon Jul 27, 2009 11:25 pm

Hello,

I added your calendar plugin and created a page called Calendar of Events. On that page I placed only the text {CALENDAR}. I added one event to the calendar, which has a start and end date of 2009-08-03. However, when I view the Calendar of Events page, I get this error:

Fatal error: Cannot redeclare month_comparison() (previously declared in /home/bakersf2/public_html/beta/wp-content/plugins/calendar/calendar.php:2512) in /home/bakersf2/public_html/beta/wp-content/plugins/calendar/calendar.php on line 2512

Do you know why this is happening? Thank you.

User avatar
Kieran
Posts: 2067
Joined: Sat May 26, 2007 1:55 pm
Location: London
Contact:

Re: Error after adding calendar to my site

Unread post by Kieran » Mon Jul 27, 2009 11:41 pm

There is almost certainly a conflict with another plugin. Try deactivating all plugins apart from calendar, then it should work.

Once you have Calendar working, activate each plugin in turn, testing as you go. When you find the culprit you can remove this one and re-activate the rest.

jbaldwin
Posts: 4
Joined: Mon Jul 27, 2009 11:21 pm

Re: Error after adding calendar to my site

Unread post by jbaldwin » Sun Aug 02, 2009 4:00 am

Hi Kiernan,

Thank you for your response. I followed your advice and deactivated all of my other plugins. Unfortunately even with all of the other plugs deactivated, I get the same error message. Do you have any ideas of what else might be causing the problem? I'm using the Mimbo theme with WP version 2.8.2. Thanks so much for your help.

User avatar
Kieran
Posts: 2067
Joined: Sat May 26, 2007 1:55 pm
Location: London
Contact:

Re: Error after adding calendar to my site

Unread post by Kieran » Sun Aug 02, 2009 11:28 pm

It must be in your theme then. Have you tried testing with another theme to eliminate that as an issue?

jbaldwin
Posts: 4
Joined: Mon Jul 27, 2009 11:21 pm

Re: Error after adding calendar to my site

Unread post by jbaldwin » Mon Aug 03, 2009 5:41 pm

What theme do you know works with your calendar plugin so I'm sure to choose correctly for this test?

User avatar
Kieran
Posts: 2067
Joined: Sat May 26, 2007 1:55 pm
Location: London
Contact:

Re: Error after adding calendar to my site

Unread post by Kieran » Mon Aug 03, 2009 5:45 pm

The default kubrick theme definitely works

jbaldwin
Posts: 4
Joined: Mon Jul 27, 2009 11:21 pm

Re: Error after adding calendar to my site

Unread post by jbaldwin » Mon Aug 10, 2009 12:43 am

Hi Kiernan,

Sorry it's taken me a little while to get back to you on this. The problems seems to be that the plugin is not compatible with the WordPress theme Mimbo 3.0. But ... I've done so much work to my site, I'm not going to change themes. For now I'll settle for the plugin WPListCal, although it is just a list of events. I'd rather use an interactive calendar plugin such as yours. Thanks for the help, and let me know if you make changes to your plugin to be compatible with the Mimbo theme. Thanks!

Jennifer

User avatar
Kieran
Posts: 2067
Joined: Sat May 26, 2007 1:55 pm
Location: London
Contact:

Re: Error after adding calendar to my site

Unread post by Kieran » Mon Aug 10, 2009 6:05 pm

You should look in your theme's functions file, check to see if the offending function is there, and if it is, rename it and all the locations within your theme that call it. This should sort the problem.

As a general statement, there will not be any changes to Calendar for theme compatibility. Calendar will always work flawlessly with the latest WordPress out of the box with the default theme. Anything else is up to the end user to resolve.

sarah
Posts: 2
Joined: Wed Aug 19, 2009 1:01 am

Re: Error after adding calendar to my site

Unread post by sarah » Wed Aug 19, 2009 5:00 am

Hi Kieran,

I've tried other calendar and event plugins but yours is by far the best. It's easy to install and manage, and the design is clean and ready to style if necessary.

I was able to install the calendar just fine. It's showing Today's Events and Upcoming Events very nicely on the sidebar. All is well until I tried to email the calendar using WP Email.

I'm using the latest everything (Wordpress 2.8.4, Atahualpa theme 3.4.2, Calendar 1.2.2, and WP-Email 2.50).

There's a WP Email link on the pages footer. When I click this to email the calendar, I get the same error message as Jennifer's. I've tried deactivating all the plugins, and then reactivating Calendar and WP Email. No luck.

Since I couldn't find any other function called monthly_comparison() anywhere else, I tried renaming the function everywhere in calendar.php. But I get the same error message. I don't get the message when emailing other pages or posts.

I would appreciate your looking into this. Thank you!

User avatar
Kieran
Posts: 2067
Joined: Sat May 26, 2007 1:55 pm
Location: London
Contact:

Re: Error after adding calendar to my site

Unread post by Kieran » Wed Aug 19, 2009 6:22 am

The function is only defined once in calendar.php (it is called a few times as you will have noticed). This means that this error simply should not appear.

Usually you will only be getting this error if either the same function is somehow defined in your theme, or if the function is defined within another plugin, indeed I have never seen an example of where this wasn't the reason behind the problem.

Seeing as you have ruled out both of these options by renaming the function in Calendar however, I'm fresh out of ideas :(

Post Reply