Support

Account

Home Forums Backend Issues (wp-admin) Update fields in multisite 503 error Reply To: Update fields in multisite 503 error

  • Because you are switching to blog 1 and then trying to update the field there, this is causing your first filter to run, the call to your first filter is then causing your second filter to run creating an infinite loop.

    In each filter you must have the filter remove itself before trying to update the other field and then re-add the filter when your done. This must be done in both filters

    example:

    
    add_filter('acf/update_value/key=field_5edd04a1cc440', '_acf_update_value_key_field_5edd04a1cc440', 11, 3);
    
    function _acf_update_value_key_field_5edd04a1cc440($post_value, $post_id, $field) {
     // remove self
     remove_filter('acf/update_value/key=field_5edd04a1cc440', '_acf_update_value_key_field_5edd04a1cc440', 11);
    
    // preform filter operation
    
      // re-add self
      add_filter('acf/update_value/key=field_5edd04a1cc440', '_acf_update_value_key_field_5edd04a1cc440', 11, 3);
    
      return $post_value;
    }