• Resolved kindred

    (@kindred)


    for viewing the attendee list (printable view)

    …./wp-admin/edit.php?post_type=event&page=events-manager-bookings&action=bookings_report&event_id=19

    I get a white screen error:
    Error thrown
    Call to a member function get_name() on null

    using
    php 7.4
    WP 5.8
    Events Manager 5.10

    I need a way to be able to view the people booked for each timeslot and there does not seem to be ANY display of this information as a cohesive whole. I can vie EACH individual booking to note the time slot, but not a list of all time slots and the people booked for those slots.

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

    (@angelo_nwl)

    I see what you mean now, I already inform the Devs about this; should get fixed soon

    I’m also trying a workaround on this.

    This is happening at line 35 of
    /wp-content/plugins/events-manager/templates/templates/bookings-event-printable.php:

    
    			<td><?php echo $EM_Booking->person->get_name() ?></td> 
    			<td><?php echo $EM_Booking->person->user_email ?></td>
    			<td><?php echo $EM_Booking->person->phone ?></td>
    

    Should not that be

    
    			<td><?php echo $EM_Booking->get_person()->get_name() ?></td> 
    			<td><?php echo $EM_Booking->get_person()->user_email ?></td>
    			<td><?php echo $EM_Booking->get_person()->phone ?></td>
    

    $EM_Booking->person->get_name() is used 6 times in the code of the plugin. $EM_Booking->get_person()->get_name() is also used 6 times in the code, for instance on line 12 of
    /wp-content/plugins/events-manager/templates/placeholders/attendeeslist.php

    In /wp-content/plugins/events-manager/classes/em-bookings-table.php both variants are present.

    Probably caused by this fix in 5.10:

    removed loading of EM_Person upon construct of EM_Booking to prevent unecessary pre-loading

    we also have this terrible problem!

    @tomaxteatro Did you try making the 3 changes in /wp-content/plugins/events-manager/templates/templates/bookings-event-printable.php ?

    Looks like it is solved in version 5.11:

    . fixed booking-related php errors deriving from accessing $EM_Booking->people directly since 5.10
    . added ‘week’, ‘this-week’ and ‘this-month’ scopes

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Call to a member function get_name() on null’ is closed to new replies.