Support

Account

Home Forums General Issues Get_fields error of deleted users in repeater

Unread

Get_fields error of deleted users in repeater

  • I have a custom post type of events.
    With a bunch of ACF fields on the custom post type. One of these fields is a repeater with event-administrators(users with a spesific role)

    However if i delete one of the users that is registred as a event-administrator in wordpress core users. Then when i run get_fields($post->ID) it prints the following notice:

    <b>Notice</b>:  Trying to get property 'user_firstname' of non-object in <b>\wp-content\plugins\advanced-custom-fields-pro\includes\fields\class-acf-field-user.php</b> on line <b>567</b>
    
    <b>Notice</b>:  Trying to get property 'user_lastname' of non-object in <b>\wp-content\plugins\advanced-custom-fields-pro\includes\fields\class-acf-field-user.php</b> on line <b>568</b>
    
    <b>Notice</b>:  Trying to get property 'nickname' of non-object in <b>\wp-content\plugins\advanced-custom-fields-pro\includes\fields\class-acf-field-user.php</b> on line <b>569</b>
    
    <b>Notice</b>:  Trying to get property 'user_nicename' of non-object in <b>\wp-content\plugins\advanced-custom-fields-pro\includes\fields\class-acf-field-user.php</b> on line <b>570</b>
    
    <b>Notice</b>:  Trying to get property 'display_name' of non-object in <b>\wp-content\plugins\advanced-custom-fields-pro\includes\fields\class-acf-field-user.php</b> on line <b>571</b>
    
    <b>Notice</b>:  Trying to get property 'user_email' of non-object in <b>\wp-content\plugins\advanced-custom-fields-pro\includes\fields\class-acf-field-user.php</b> on line <b>572</b>
    
    <b>Notice</b>:  Trying to get property 'user_url' of non-object in <b>\wp-content\plugins\advanced-custom-fields-pro\includes\fields\class-acf-field-user.php</b> on line <b>573</b>
    
    <b>Notice</b>:  Trying to get property 'user_registered' of non-object in <b>r\wp-content\plugins\advanced-custom-fields-pro\includes\fields\class-acf-field-user.php</b> on line <b>574</b>
    
    <b>Notice</b>:  Trying to get property 'user_description' of non-object in <b>\wp-content\plugins\advanced-custom-fields-pro\includes\fields\class-acf-field-user.php</b> on line <b>575</b>

    Any ideas how to remove the event-administrators rows from all events if the user is deleted or remove the notice (not remove by just set debug to false)?

Viewing 1 post (of 1 total)

The topic ‘Get_fields error of deleted users in repeater’ is closed to new replies.