Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deletes original fields!? #10

Open
dsamson opened this issue Nov 27, 2015 · 2 comments
Open

Deletes original fields!? #10

dsamson opened this issue Nov 27, 2015 · 2 comments

Comments

@dsamson
Copy link

dsamson commented Nov 27, 2015

Has anyone else ran into an issue where if you delete a reusable field group that's linked to another group in the drop down... It then goes ahead and deletes ALL of the fields associated with the field group it was linked to.

After further investigation it appears to be this function in acf-reusable_field_group-v5.php
Anyone know what this is suppose to be doing?

function delete_field( $field ) {

    // loop through sub fields
    if( !empty($field['sub_fields']) ) {

        foreach( $field['sub_fields'] as $sub_field ) {

            acf_delete_field( $sub_field['ID'] );

        }

    }

}
@skechele
Copy link

Thank you so much, I thought i was going nuts. I couldnt figure out that it was related to this plugin.

Commenting out the source code seems to fix it. It doesnt make a lot of sense to me anyway. Why would this Plugin delete a Post, it doesnt create a Post.

Did you try commenting it out? Did you run into any problems?

@dsamson
Copy link
Author

dsamson commented Mar 8, 2017

Yeah, I commented out the code and everything seems to work as it should now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants