• Resolved rextherunt

    (@rextherunt)


    Hi

    I’m getting this error whenever someone creates a booking:

    Warning: Creating default object from empty value in /wp-includes/capabilities.php on line 641

    I’ve made sure that I’ve checked “anyone can register” in the WP settings, but no user is created, and I get one error line for every booking, on both the front and back end.

    I hid the front end error by adding
    ini_set(‘display_errors’,’off’);
    to my index.php, but this is not a long-term solution.

    Any ideas?
    I am aware that i need to upgrade WP and the events manager plugin – is this going to solve my error problem?

    Thanks in advance for the help!

    http://wordpress.org/plugins/events-manager/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    since the warning message is not directly pointing to EM maybe you can try the following steps to narrow down the problem:

    – deactivating all other plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).
    – switching to the default theme to rule out any theme-specific problems

    Thread Starter rextherunt

    (@rextherunt)

    OK, I will try that. I thought it was related to EM – are you sure it’s not?

    That error relates to WordPress roles and capabilities, which could be caused by any plugin or theme. Angelo’s suggestion will help you to narrow down which.

    Thanks

    Thread Starter rextherunt

    (@rextherunt)

    Thanks…
    I narrowed it down to the Events Manager plugin!
    I’ve updated EM to the latest version 5.5.2, and updated to WP 3.8.1.
    My host is running PHP 5.4.23

    This error occurs when I load a page:
    Warning: Creating default object from empty value in /wp-includes/capabilities.php on line 641

    This additional error occurs when I change any settings in the back end, and prevents the page from loading:

    Warning: Cannot modify header information – headers already sent by (output started at /wp-includes/capabilities.php:641) in /wp-includes/pluggable.php on line 876

    Any help would be appreciated!

    Thread Starter rextherunt

    (@rextherunt)

    I have installed an exact copy of the site on my local host using MAMP, and I do not get the error.

    Which PHP version are you using with MAMP?

    Thread Starter rextherunt

    (@rextherunt)

    5.4.10

    So would you say the PHP version is the only difference between the two installs? Or do you have something different in the user setup?

    Thread Starter rextherunt

    (@rextherunt)

    I can’t find any other difference. There are bound to be some other server side minor differences, they can’t be identical.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    Have you tried to temporarily:

    – deactivating all other plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the default theme to rule out any theme-specific problems

    Thread Starter rextherunt

    (@rextherunt)

    I did deactivate the plugins and as mentioned above, the events plugin is what causes the problem. I have the same theme on my local installation, and it causes no problems.

    It’s a hassle to switch themes, as I have to replace all my widgets and menu settings manually. Because of the php errors, I can’t download my theme settings files either.

    Thread Starter rextherunt

    (@rextherunt)

    I have got my host to put this in the PHP settings:

    display_errors = Off
    display_startup_errors = Off

    Can you advise whether this is a good idea? Seeing as I can’t solve it any other way, I’m stuck with this solution.

    Yep, that’s an adequate solution.

    Cheers

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘PHP error when a booking is created’ is closed to new replies.