Home Forums ACF PRO Multisite acf/load_value/name= doesn't work after 5.3.7


Multisite acf/load_value/name= doesn't work after 5.3.7

  • If I update beyond ACF PRO 5.3.7, this function no longer works. What it does is use the switch_to_blog(); in multisite to load values from another site within the network.
    After the update, the routine will load the values from the other site, but then will not switch back to the originating site to load the next set when there is a repeated field.
    function mhsl_acf_load_value( $value, $post_id, $field ) {
    if( empty($value) ) { return $value; } else {
    $blog_id = get_current_blog_id();
    return $value;
    switch_to_blog($blog_id); // restore_current_blog();
    add_filter(‘acf/load_value/name=who’, ‘mhsl_acf_load_value’,10, 3);

    In my case, I have one site in a multisite environment where I keep all information about our law school’s faculty, staff, advisory boards, and any other people. I use function to filter the query on other sites to do the lookup on the site with the ID 5. It’s worked slick for a long time.
    An example page where the problem occurs is:
    If I update beyond 5.3.7, the first group Executive Committee returns fine, but the I can’t get it to not return to the original site to continue the loop for the next group of people Trustees.

  • Hi @terrence-bogie ,

    Thanks a lot for contacting us.

    I tried replicating the issue on my end with no luck.

    Could you kindly open a support ticket with us and share with us the credentials to your dev server so that we may have be able to test the issue.

    Hope to hear from you soon.

  • This reply has been marked as private.
  • Hi @terrence-bogie,

    Apologies for the delay in getting back to you.

    Please open a support ticket by sending the same information via email to [email protected] and our friendly support team will get back to you ASAP!

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Multisite acf/load_value/name= doesn't work after 5.3.7’ is closed to new replies.