• Hi,
    There is a error once you try to save posts chosen with Relation field, assigned on custom taxonomy, term view.

    If you select some posts from left panel to the right and save, you get error as below.
    If you don’t select any posts and just save then it’s fine.

    Once you disable your plugin, there is no error present.

    Can you check it ?

    the path: wp-admin/term.php?taxonomy=team_tax&tag_ID=10&post_type=zespol

    Stack trace:
    #0 /home/…public_html/www/wp-includes/taxonomy.php(1558): trim()
    #1 /home/…public_html/www/wp-content/plugins/acf-extended/includes/fields-settings/validation.php(482): term_exists()
    #2 /home/…public_html/www/wp-includes/class-wp-hook.php(308): acfe_field_validation->validate_value()
    #3 /home/…public_html/www/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #4 /home/…public_html/www/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php(392): apply_filters()
    #5 /home/…public_html/www/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php(341): acf_validate_value()
    #6 /home/…public_html/www/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php(208): acf_validate_values()
    #7 /home/…public_html/www/wp-includes/class-wp-hook.php(308): acf_validation->acf_validate_save_post()
    #8 /home/…public_html/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #9 /home/…public_html/www/wp-includes/plugin.php(517): WP_Hook->do_action()
    #10 /home/…public_html/www/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php(274): do_action()
    #11 /home/…public_html/www/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-taxonomy.php(351): acf_validate_save_post()
    #12 /home/…public_html/www/wp-includes/class-wp-hook.php(310): acf_form_taxonomy->save_term()
    #13 /home/…public_html/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #14 /home/…public_html/www/wp-includes/plugin.php(517): WP_Hook->do_action()
    #15 /home/…public_html/www/wp-includes/taxonomy.php(3333): do_action()
    #16 /home/…public_html/www/wp-admin/edit-tags.php(183): wp_update_term()
    #17 {main}
    thrown in /home/…public_html/www/wp-includes/taxonomy.php on line 1558

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    Looking closer at the error you shared it looks like you’re using the term_exists function inside a rule of the Advanced Validation setting of a field.

    I would recommend to check the settings of the Fields of the Field Group displayed on the Term Edit page, and remove that rule. If the term_exists(value) rule is used on a ACF Relationship field, then it should be removed because the Relationship field use an array of value, which is incompatible with term_exists() (See documentation). Also the value of the Relationship are Post IDs, and not terms so the rule wouldn’t really make sense here.

    Unfortunately, I can’t really control what function is used in the Advanced Validation settings, because that setting is global for all fields, so it’s up to the developper to choose and test its rules.

    Hope it helps!

    Have a nice day!

    Regards.

    Thread Starter Mastafu Design

    (@mastafu)

    Hi Konrad,

    That fixed the problem. Thx.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    I’m glad to hear it now works as expected!

    If you enjoy this plugin and its support, feel free to submit a review. It always helps and it’s much appreciated 🙂

    Have a nice day!

    Regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error on term save, with relation field present’ is closed to new replies.