Support

Account

Forum Replies Created

  • Adrian, This is the file I changed in the plugin ‘advanced-custom-fields-pro/includes/acf-field-functions.php’

    ORIGINAL
    // Check local fields first.
    if( acf_have_local_fields($parent[‘key’]) ) {
    $raw_fields = acf_get_local_fields( $parent[‘key’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘key’] );
    }

    // Then check database.
    } else {
    $raw_fields = acf_get_raw_fields( $parent[‘ID’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘ID’] );
    }
    }

    MODIFIED
    if ( isset( $parent[‘key’] ) && isset( $parent[‘ID’] ) ) {

    // Check local fields first.
    if( acf_have_local_fields($parent[‘key’]) ) {
    $raw_fields = acf_get_local_fields( $parent[‘key’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘key’] );
    }

    // Then check database.
    } else {
    if ( isset( $parent[‘ID’] ) ) {
    $raw_fields = acf_get_raw_fields( $parent[‘ID’] );
    foreach ( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘ID’] );
    }
    }
    }
    }

  • This is the file I changed in the plugin ‘advanced-custom-fields-pro/includes/acf-field-functions.php’

    ORIGINAL
    // Check local fields first.
    if( acf_have_local_fields($parent[‘key’]) ) {
    $raw_fields = acf_get_local_fields( $parent[‘key’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘key’] );
    }

    // Then check database.
    } else {
    $raw_fields = acf_get_raw_fields( $parent[‘ID’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘ID’] );
    }
    }

    MODIFIED
    if ( isset( $parent[‘key’] ) && isset( $parent[‘ID’] ) ) {

    // Check local fields first.
    if( acf_have_local_fields($parent[‘key’]) ) {
    $raw_fields = acf_get_local_fields( $parent[‘key’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘key’] );
    }

    // Then check database.
    } else {
    if ( isset( $parent[‘ID’] ) ) {
    $raw_fields = acf_get_raw_fields( $parent[‘ID’] );
    foreach ( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘ID’] );
    }
    }
    }
    }

  • @codaboor This is the file I changed in the plugin ‘advanced-custom-fields-pro/includes/acf-field-functions.php’

    ORIGINAL
    // Check local fields first.
    if( acf_have_local_fields($parent[‘key’]) ) {
    $raw_fields = acf_get_local_fields( $parent[‘key’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘key’] );
    }

    // Then check database.
    } else {
    $raw_fields = acf_get_raw_fields( $parent[‘ID’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘ID’] );
    }
    }

    MODIFIED
    if ( isset( $parent[‘key’] ) && isset( $parent[‘ID’] ) ) {

    // Check local fields first.
    if( acf_have_local_fields($parent[‘key’]) ) {
    $raw_fields = acf_get_local_fields( $parent[‘key’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘key’] );
    }

    // Then check database.
    } else {
    if ( isset( $parent[‘ID’] ) ) {
    $raw_fields = acf_get_raw_fields( $parent[‘ID’] );
    foreach ( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘ID’] );
    }
    }
    }
    }

  • @codaboor This is the file I changed in the plugin advanced-custom-fields-pro/includes/acf-field-functions.php

    ORIGINAL
    // Check local fields first.
    if( acf_have_local_fields($parent[‘key’]) ) {
    $raw_fields = acf_get_local_fields( $parent[‘key’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘key’] );
    }

    // Then check database.
    } else {
    $raw_fields = acf_get_raw_fields( $parent[‘ID’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘ID’] );
    }
    }

    MODIFIED
    if ( isset( $parent[‘key’] ) && isset( $parent[‘ID’] ) ) {

    // Check local fields first.
    if( acf_have_local_fields($parent[‘key’]) ) {
    $raw_fields = acf_get_local_fields( $parent[‘key’] );
    foreach( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘key’] );
    }

    // Then check database.
    } else {
    if ( isset( $parent[‘ID’] ) ) {
    $raw_fields = acf_get_raw_fields( $parent[‘ID’] );
    foreach ( $raw_fields as $raw_field ) {
    $fields[] = acf_get_field( $raw_field[‘ID’] );
    }
    }
    }
    }

  • @codaboor This is the file I changed in the plugin advanced-custom-fields-pro/includes/acf-field-functions.php

    ORIGINAL

    
    // Check local fields first.
    if( acf_have_local_fields($parent['key']) ) {
    	$raw_fields = acf_get_local_fields( $parent['key'] );
    	foreach( $raw_fields as $raw_field ) {
    		$fields[] = acf_get_field( $raw_field['key'] );
    	}
     	
    // Then check database.
    } else {
    	$raw_fields = acf_get_raw_fields( $parent['ID'] );
    	foreach( $raw_fields as $raw_field ) {
    		$fields[] = acf_get_field( $raw_field['ID'] );
    	}
    }
    

    MODIFIED

    
    if ( isset( $parent['key'] ) && isset( $parent['ID'] ) ) {
    
    	// Check local fields first.
    	if( acf_have_local_fields($parent['key']) ) {
    		$raw_fields = acf_get_local_fields( $parent['key'] );
    		foreach( $raw_fields as $raw_field ) {
    			$fields[] = acf_get_field( $raw_field['key'] );
    		}
    
    	// Then check database.
    	} else {
    		if ( isset( $parent['ID'] ) ) {
    			$raw_fields = acf_get_raw_fields( $parent['ID'] );
    			foreach ( $raw_fields as $raw_field ) {
    				$fields[] = acf_get_field( $raw_field['ID'] );
    			}
    		}
    	}
    }
    
  • @codaboor This is the file I changed in the plugin advanced-custom-fields-pro/includes/acf-field-functions.php

    ORIGINAL

    
    // Check local fields first.
    if( acf_have_local_fields($parent['key']) ) {
    	$raw_fields = acf_get_local_fields( $parent['key'] );
    	foreach( $raw_fields as $raw_field ) {
    		$fields[] = acf_get_field( $raw_field['key'] );
    	}
     	
    // Then check database.
    } else {
    	$raw_fields = acf_get_raw_fields( $parent['ID'] );
    	foreach( $raw_fields as $raw_field ) {
    		$fields[] = acf_get_field( $raw_field['ID'] );
    	}
    }
    

    MODIFIED

    
    if ( isset( $parent['key'] ) && isset( $parent['ID'] ) ) {
    
    	// Check local fields first.
    	if( acf_have_local_fields($parent['key']) ) {
    		$raw_fields = acf_get_local_fields( $parent['key'] );
    		foreach( $raw_fields as $raw_field ) {
    			$fields[] = acf_get_field( $raw_field['key'] );
    		}
    
    	// Then check database.
    	} else {
    		if ( isset( $parent['ID'] ) ) {
    			$raw_fields = acf_get_raw_fields( $parent['ID'] );
    			foreach ( $raw_fields as $raw_field ) {
    				$fields[] = acf_get_field( $raw_field['ID'] );
    			}
    		}
    	}
    }
    
  • I’m having this issue as well after updating 5.7.10 to the latest 5.8.7.

    Following Pacart’s advice I’ve added a presence check before calling $parent[‘key’] or $parent[‘id’] respectively and it seems to have solved the issue. Will the fix be included in any update soon?

  • I have a similar issue. I’m just updating now from just 5.7.0-RC2 to 5.8.4, and I have an issue with json sync. I’ve tested different versions as I’m going up and it breaks for me starting on 5.7.12.

    I have a WP multisite with the following setup and they both use json sync. Each theme has its own json sync files.
    – Site 1: Parent theme
    – Site 2: Child theme

    On the parent theme on Site 1, syncing files works just fine, but when doing the same in the child theme on Site 2, the fields are empty after syncing. 5.7.10 is the last version where things seem to work fine but now that i’m trying to update to latest version, my site is breaking because these fields are all empty.

    Could anyone help please?

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