Support

Home Forums Event Espresso Premium Fatal error: Class 'Event_Espresso_Widget' not found

Fatal error: Class 'Event_Espresso_Widget' not found

Posted: August 27, 2013 at 6:16 pm

Viewing 11 reply threads


SBWPS5280

August 27, 2013 at 6:16 pm

I’ve installed the latest version of the plugin and am running 3.6 and am getting this error:

Fatal error: Class ‘Event_Espresso_Widget’ not found in *moderated*/wp-includes/widgets.php on line 324

which of course is crashing the site.

Please advise
Thank You

  • This topic was modified 11 years, 3 months ago by Josh. Reason: removed the server file paths


Josh

  • Support Staff

August 27, 2013 at 6:56 pm

Hi there,

I’m sorry for the trouble. I can advise downloading a fresh copy of Event Espresso from your account page and re-installing.

The Event Espresso widget is registered in espresso.php immediately after the /templates/widget.php template is loaded up, which is where the “Event_Espresso_Widget” class is instantiated. Along with that, I can advise checking your copy and making sure that /templates/widget.php is present and contains this code on its first 17 lines:

<?php
if (!class_exists('Event_Espresso_Widget')) {

    class Event_Espresso_Widget extends WP_Widget {

        function Event_Espresso_Widget() {

            /* Widget settings. */

            $widget_options = array('classname' => 'events', 'description' => __('A widget to display your upcoming events.', 'event_espresso'));
            /* Widget control settings. */

            $control_options = array('width' => 300, 'height' => 350, 'id_base' => 'events-widget');
            /* Create the widget. */

            $this->WP_Widget('events-widget', __('Event Espresso Upcoming Events Widget', 'event_espresso'), $widget_options, $control_options);
        }


SBWPS5280

August 28, 2013 at 3:06 pm

Hi There

The plugin was installed from a fresh download from the website yesterday. I also checked the widget.php file and lines of code listed above are present.

I also activating the plugin by deactivating all of the plugins and then activating only EE. The result was a server error in chrome and the “white screen of death” in Firefox.

I renamed the file event-espressobroken and the website was fine again.

Please advise.


Josh

  • Support Staff

August 28, 2013 at 8:18 pm

Can you try deleting the version you have installed right now? This may be a case where the zip file isn’t getting installed via the built in WP plugin installing. The sure fire way to avoid this is by installing via FTP:

https://eventespresso.com/wiki/installing-event-espresso/#ftp

This has come up twice before and was resolved by installing via FTP:

https://eventespresso.com/topic/site-inoperative-fatal-error-class-event_espresso_widget-not-found/#post-9940

https://eventespresso.com/topic/update-crashed-site/


SBWPS5280

August 28, 2013 at 10:25 pm

I have tried installing the plugin through the Dashboard and through ftp. Just to be sure I downloaded the plugin again today and tried installing it again through ftp.


Josh

  • Support Staff

August 29, 2013 at 8:05 am

I’m assuming that did not help? Can you check which version of PHP is running on your server?


SBWPS5280

August 29, 2013 at 9:11 am

[OK] WordPress Version = 3.6
[OK] MySQL Version = 5.5.33
[WARNING] AddHandler in .htaccess = exists
[OK] PHP Version = 5.3.27

  • This reply was modified 11 years, 3 months ago by Josh. Reason: removed sensitive server details and irrelevant information


Josh

  • Support Staff

August 29, 2013 at 9:20 am

That’s a bit too much information. In the future, please do not post sensitive server details in a public forum. I will go back through and moderate them.

In the meantime, can you FTP in and comment out line 439 of espresso.php which will then read:

//add_action('widgets_init', 'load_event_espresso_widget');


SBWPS5280

August 29, 2013 at 10:10 am

I commented out line 439 and the admin nor the site did not break this time.

However, when you navigate to the page this error displays

Fatal error: Call to undefined function display_all_events() in ……../espresso.php on line 958


Josh

  • Support Staff

August 29, 2013 at 10:34 am

Hi there,

The display_all_events function is defined in event-espresso/templates/event_list.php on line 9. Can you check to see if that file is there and the function is there too?

If it’s not there it will need to be uploaded via FTP.

If it is there, can you check with your host and verify that the permissions on the server allow PHP to read the files in the wp-content/plugins/event-espresso/templates directory?


SBWPS5280

August 29, 2013 at 10:55 am

The file and the function are there, the permissions for those files were 644 I changed them to 755 so they are also executable.

No change.

I also tried changing the theme to 2010 from Headway to see if there was a conflict there no go.

Same.


Josh

  • Support Staff

August 29, 2013 at 11:13 am

Hi there,

Please check on this with your host and ask them to look into it. There may be something locked down and it’s not allowing access to these files. Typically, when you change a file’s permissions it should not be set any higher than 664. Changing them to 755 will not necessarily fix anything.

http://codex.wordpress.org/Changing_File_Permissions#Permission_Scheme_for_WordPress

Viewing 11 reply threads

The support post ‘Fatal error: Class 'Event_Espresso_Widget' not found’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso