Fatal error: Cannot redeclare class serendipity_calendar_plu

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
hdiaz36
Regular
Posts: 57
Joined: Wed Feb 21, 2007 6:57 pm
Location: China (Yes, really)

Fatal error: Cannot redeclare class serendipity_calendar_plu

Post by hdiaz36 » Fri Mar 05, 2010 4:13 pm

Oops!

I was trying to install a second (and third) copy of the Popular Entries sidebar plugin. I received an error message something like Fatal error: Cannot redeclare class serendipity_calendar_plugin in include/plugin_internal.inc.php on line 360

On the third attempt I saw no error message, but when I went to configure my plugins I saw that I had two extra Popular Entries which I assumed must have come from the first two (failed?) attempts.

I first tried removing these two, but received the same error message. I decide to drag them to the hidden column as a temporary solution. After clicking save I saw the same error message, but now the entire "configure plugin" page is not being displayed properly. I can only see a few items on this page. I already tried disabling advanced JS. No change.

These are lines 350-360 of that specific file:

Code: Select all

        $plugin_calendar_data = array('month_date'   => $ts,
            'uri_previous' => serendipity_archiveDateUrl(sprintf('%04d/%02d', $previousYear, $previousMonth). $add_query),
            'uri_month'    => serendipity_archiveDateUrl(sprintf('%04d/%02d', $year, $month) . $add_query),
            'uri_next'     => serendipity_archiveDateUrl(sprintf('%04d/%02d',$nextYear, $nextMonth) . $add_query),
            'minScroll'    => $minmax[0]['min'],
            'maxScroll'    => $minmax[0]['max']);
        $serendipity['smarty']->assign_by_ref('plugin_calendar_head', $plugin_calendar_data);
        echo serendipity_smarty_fetch('CALENDAR', 'plugin_calendar.tpl');

    } // end function
} // end class


Any help or ideas with this?

EDIT: While doing some research here I saw that a possible way to solve this problem would be to delete the plugins/serendipity_plugin_popularentries. Haha, but the only problem is that for some strange reason I cannot delete that folder!
Image

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Fatal error: Cannot redeclare class serendipity_calendar_plu

Post by garvinhicking » Mon Mar 08, 2010 12:14 pm

Hi!

Hm, this Fatal error line should not really happen, as it is related to the calendar_plugin, and the internal plugins are only loaded once.

To disable plugins manually, you could use phpMyAdmin and check the "serendipity_plugins" database table. For each installed plugin there is a row for that plugin. You could delete the reference from that database table to "uninstall" a plugin - does that help you?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

hdiaz36
Regular
Posts: 57
Joined: Wed Feb 21, 2007 6:57 pm
Location: China (Yes, really)

Re: Fatal error: Cannot redeclare class serendipity_calendar_plu

Post by hdiaz36 » Mon Mar 08, 2010 4:59 pm

Thank you!

That worked perfectly and I can now configure the plugins without the error messages. :)
Image

Post Reply