Fatal error: Call to a member function format()

WordPress Event Management, Calendars & Registration Forums Report A Bug Fatal error: Call to a member function format()

This topic contains 6 replies, has 2 voices, and was last updated by  Ian Gray 11 years, 6 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5761

    I’m finally getting round to adding EO Pro to a site I have in development. I’ve not tested out the booking feature up until now. Unfortunately when I try and put my name and email address, select the tickets and click book, I get the following error message:

    Fatal error: Call to a member function format() on a non-object in /home/user/public_html/staging/wp-content/plugins/event-organiser/includes/event-organiser-utility-functions.php on line 35

    I still get the emails and it seems everything has been booked. What is causing the error?

    Ian Gray
    #5763

    I’m not able to replicate this issue, but the following should help identify where exactly the error is occuring, Add this to at the top of eo_format_datetime() (https://github.com/stephenharris/Event-Organiser/blob/2.0/includes/event-organiser-utility-functions.php#L29)

    if ( !( $datetime instanceof DateTime ) ) {
         echo wp_debug_backtrace_summary();
         wp_die('');
    }
    

    That should help indicate where the error is actually occurring.

    Are you booking specific dates or entire series?

    Stephen Harris
    #5785

    Hi Stephen,

    I don’t know if it was a temporary glitch, but I upgraded to the latest version of EO Pro and I don’t get the problem any more.

    I know this is kind of unrelated, but I wondered if you knew about this. When someone books a ticket they get registered as a WordPress user. I’m not overly comfortable with this but I understand that it is probably the best way. My main issue is that the user gets an email with a generated password in plain text. I hate this because it is dreadful security. Is there a way to avoid this or to force the user to change the password? Also I have changed the login url and look and feel using the likes of Better WP Security so the url in that email is incorrect. I know this is out of scope of this forum but if you know I’d be grateful. Thanks.

    Ian Gray
    #5790

    Hi Ian,

    The next update will add a third of option of ‘guest’ bookings (i.e. registering is optional). But if users do not register then they/admins won’t be able to see their booking history / ‘upcoming events your attending’ (this will added in the 1.2).

    As for sending a randomly generated password there is no security issue so long as the password is changed – the user should be ‘nagged’ into changing their password (default WordPress behaviour for new users) when they log-in. In any case the bookee should have ‘subscriber’ role so even if someone stole their password they can’t really do anything (though in future updates they can view the user’s booking history).

    That said one alternative would be to request a password at the booking form – which is probably preferable form a user’s point of view. I’ll look into this for 1.2.

    Stephen Harris
    #5793

    Hi Stephen,

    Guest bookings would be great as well as being able to add the password in. I hadn’t realised that WP forced a password change- I have not developed many WP sites that require user access as of yet so that had passed me by. Requiring users to add password in on registration would be much more seamless. I love the idea of booking history- looking forwards to that one.

    As well as the password, I do think it would be good if users could choose their username too. Would that be a possibility?

    Thanks.

    Ian Gray
    #5798

    Username is currently their first and last names appended, with a number perhaps added to make it unique. I’d like to limit the number of fields needed as part of the account sign-up, so I probably won’t add a username field. In any case, the plug-in allows the user to log-in at the booking form with their e-mail address or username – since I think the latter is a bit redundant.

    Stephen Harris
    #5832

    Yes, definitely get your point there. Bet to limit fields.
    However it’s frustrating WP doesn’t allow username changes. How about offering a choice in EO settings so that admins can choose the type of username? For example:
    (firstname).(lastname)
    (firstname)(lastname)
    (firstname)_(lastname)
    (email)

    What happens if someone tries to register with the same username as someone who has tried to register previously?

    To be honest the above probably is about over the top for EO, so please feel free to say so!

    Ian Gray
Viewing 7 posts - 1 through 7 (of 7 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.