Support

Account

Home Forums Backend Issues (wp-admin) Error: Allowed memory size

Solved

Error: Allowed memory size

  • Hi,
    i have almost 25.000 user and i implementet a Userfield.
    i the field you can only select a user role of 100 users.

    i get the error
    Fatal error: Allowed memory size
    because it loads all users i think and not just the 100 users of the user role…

    can you help me?

  • Can you please help me?

  • Just added a Filter for that custom field
    `
    add_filter(‘acf/fields/user/query/name=customfieldname’, ‘acf_refernt_field_filter’, 10, 3);
    function acf_refernt_field_filter( $args, $field, $post )
    {
    // modify get users args of that field
    $args[‘role’] = ‘my-custom-user-role’;

    return $args;
    }
    `

  • This reply has been marked as private.
Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Error: Allowed memory size’ is closed to new replies.