Support

Home Forums Event Espresso Premium URGENT: Fatal error: Call to a member function get_many_related() on a non-objec

URGENT: Fatal error: Call to a member function get_many_related() on a non-objec

Posted: April 15, 2016 at 7:28 am


Matt Barnett

April 15, 2016 at 7:28 am

Only a week left before this event happens – as of the 13th started getting “First name required value” error so I updated to latest version and now when I try to edit (tried to add a test ticket to see if I could buy it) I get this error:

Fatal error: Call to a member function get_many_related() on a non-object in /home/mattbarnett/transportationclubofatlanta.com/wp-content/plugins/event-espresso-core-reg/admin_pages/events/Events_Admin_Page.core.php on line 1948

Website is Transportationclubofatlanta.com


Josh

  • Support Staff

April 15, 2016 at 7:47 am

Hi Matt,

I checked the line of code from your error message and it should only run if an event has been deleted or moved to the trash. Are you editing an event that’s not in the trash?


Matt Barnett

April 15, 2016 at 7:49 am

No – it’s an active event. All I tried to do is add a ticket and then update the event.


Matt Barnett

April 15, 2016 at 8:10 am

Could it have something to do with the fact the event shows as “upcoming” versus “active” ? I’ve put it into maintenance mode at the moment…


Josh

  • Support Staff

April 15, 2016 at 8:11 am

Hi Matt,

Can you rule out whether there’s some custom code or another plugin that’s affecting the WordPress update post hook? Normally when you update a post, like an event, no delete scripts should fire, ever. You can temporarily deactivate all other plugins, and if you have additional custom code in a theme functions.php file, that code should be temporarily commented out.


Matt Barnett

April 15, 2016 at 8:24 am

I deactivated all plug ins except for event espresso and it still happens. There should be no custom code anywhere.


Josh

  • Support Staff

April 15, 2016 at 8:25 am

Are you seeing the fatal error on the screen or in the error logs?


Matt Barnett

April 15, 2016 at 8:26 am

On the screen


Josh

  • Support Staff

April 15, 2016 at 8:38 am

We might need a developer to take a look, and possibly add some debug code in somewhere to find out what’s triggering a delete hook. Can you send FTP access along with temporary WP admin access via the secure form on this page so we can investigate further?

https://eventespresso.com/send-login-details/


Matt Barnett

April 15, 2016 at 8:52 am

Submitted. Thanks Josh.


Josh

  • Support Staff

April 15, 2016 at 10:26 am

This looks like a bug that was added to a recent update of the Divi theme. For some reason, the Divi theme is calling the wp_delete_post action when an event is updated.

this is the call stack:

{ ["file"]=> string(70) "/xxxx/xxxxxxxxxxx/transportationclubofatlanta.com/wp-includes/post.php" ["line"]=> int(2592) ["function"]=> string(9) "do_action" ["args"]=> array(2) { [0]=> &string(17) "after_delete_post" [1]=> &int(1543) } } [5]=> array(4) { ["file"]=> string(101) "/xxxx/xxxxxxxxxxx/transportationclubofatlanta.com/wp-content/themes/Divi/includes/builder/layouts.php" ["line"]=> int(305) ["function"]=> string(14) "wp_delete_post" ["args"]=> array(2) { [0]=> &int(1543) [1]=> &bool(true) } }

Can you contact Elegant themes support and let them know they should look into this?


Josh

  • Support Staff

April 15, 2016 at 10:59 am

Matt,

Here’s a copy of an older version of Divi that doesn’t cause the breakage that the later version does:

https://www.dropbox.com/s/9572iqbqnflc9gu/Divi-patched.zip?dl=0

You can download, install, and use this version in the meantime. This copy has also been patched to be compatible with WordPress 4.5, the patch was documented here:

https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list#post-8268201


Josh

  • Support Staff

April 15, 2016 at 2:19 pm

Update:

I found another way to get rid of the fatal error. Apparently after you update to a newer version of Divi, Divi tries to delete some of its custom posts on the next post update. This will not work on an Event post (as you’ve seen). So you can go to a regular WP post and update a post. Then Divi will do it’s thing and you’ll no longer see any errors when you update an event.


Matt Barnett

April 15, 2016 at 3:06 pm

Josh – that is above and beyond, man. Really appreciate it. Worked like a charm.

THANKS!


Josh

  • Support Staff

April 15, 2016 at 3:33 pm

You’re welcome.

The support post ‘URGENT: Fatal error: Call to a member function get_many_related() on a non-objec’ 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