Support

Home Forums Event Espresso Premium Every item in Settings Menu throws errors

Every item in Settings Menu throws errors

Posted: December 18, 2015 at 3:03 am

Viewing 2 reply threads


Sebastian Boëthius

December 18, 2015 at 3:03 am

Hi,

I updated the event espresso plugin today and now the settings menu delivers pages with errors:
Fatal error: Call to a member function childs() on a non-object in /home/isapzurich/public_html/wp-content/themes/everything/drone/theme.php on line 1219

I have the stripe payment gateway plugin installed, which is what I was trying to access.

Other plugins relevant to EE:
WP Users
Promotions

All plugins are up to date. The theme, which is referenced, was working before. I tried updating to the latest release Everything 3.0.1, and it didn’t fix the issue.

Thanks in advance!


Tony

  • Support Staff

December 18, 2015 at 3:57 am

Hi Sebastian,

Can you send me a copy of the theme please? I’d like to take a look at the code causing the error.

Its a fatal error being thrown by your theme but without viewing the code we can’t narrow this down much.

You’ll need to host the file somewhere (for example dropbox) and email a link we can use download it to support[at]eventespresso.com


Josh

  • Support Staff

December 21, 2015 at 3:05 pm

Hi Sebastian,

The errors you’re seeing can be fixed by making the code in that theme a bit more defensive. In /everything/drone/theme.php, right within __actionAddMetaBoxes method that starts on line 1216, this check can be added before the foreach loop:

if ( $this->getPostOptions() instanceof \Drone\Options\Group\Post ) {
then you’ll need to be sure to add the } to end the if statement.

So the resulting change will look like this:

public function __actionAddMetaBoxes()
{
 if ( $this->getPostOptions() instanceof \Drone\Options\Group\Post ) {
	foreach ($this->getPostOptions()->childs('group') as $name => $group) {
		add_meta_box(
			Func::stringID($name), $group->label,
			function() use ($group) {
				require Theme::getInstance()->drone_dir.'/tpl/post-options.php';
			},
			null, $group->context, $group->priority
		);
	}
 }
}
Viewing 2 reply threads

The support post ‘Every item in Settings Menu throws errors’ 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