Page 1 of 1

Fatal error: Cannot redeclare class serendipity_calendar_plu

Posted: Fri Mar 05, 2010 4:13 pm
by hdiaz36
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!

Re: Fatal error: Cannot redeclare class serendipity_calendar_plu

Posted: Mon Mar 08, 2010 12:14 pm
by garvinhicking
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

Re: Fatal error: Cannot redeclare class serendipity_calendar_plu

Posted: Mon Mar 08, 2010 4:59 pm
by hdiaz36
Thank you!

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