WordPress.org

Forums

Events Manager
[resolved] PHP error when a booking is created (14 posts)

  1. rextherunt
    Member
    Posted 1 year ago #

    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/

  2. angelo
    NetWebLogic Support
    Posted 1 year ago #

    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

  3. rextherunt
    Member
    Posted 1 year ago #

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

  4. Philip John
    Member
    Posted 1 year ago #

    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

  5. rextherunt
    Member
    Posted 1 year ago #

    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!

  6. rextherunt
    Member
    Posted 1 year ago #

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

  7. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    Which PHP version are you using with MAMP?

  8. rextherunt
    Member
    Posted 1 year ago #

    5.4.10

  9. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    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?

  10. rextherunt
    Member
    Posted 1 year ago #

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

  11. angelo
    NetWebLogic Support
    Posted 1 year ago #

    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

  12. rextherunt
    Member
    Posted 1 year ago #

    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.

  13. rextherunt
    Member
    Posted 1 year ago #

    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.

  14. Philip John
    Member
    Posted 1 year ago #

    Yep, that's an adequate solution.

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic