Support

Account

Home Forums Backend Issues (wp-admin) Taxonomy load value creating new term

Solved

Taxonomy load value creating new term

  • I have a set of taxonomy fields that all update the posts terms for those taxonomies.

    screenshot of setup: http://postimg.org/image/wbnnict71/

    This has been working fine however now for some reason when udating the terms and saving the post a new term is added rather than updating the existing term.

    screenshot http://postimg.org/image/55rcorqqt/

    You can see the issue in the Taxonomies box under the featured image in the right hand column. Take the categorises field for example. The only options should by cycle crusing holiday and cycle touring holiday but each time you update the post a new term is added.

    I have switch too 2012 and 2013 default themes and disabled all plugins apart from advanced custom fields, I also disabled all acf extensions. The issue still occurs.

    Wordpress: 3.6
    Advanced custom fields: 4.2.0

    Any ideas?

    Thanks

  • I also am experiencing this issue and came on here to post the same item. I have the most recent versions of WP and ACF installed.

  • Yup, I have the same issue. I think it happens with a multiple values field type only.

  • Hi guys.

    I don’t believe any code has changed in ACF to the taxonomy field, so I wonder if the issue stems from WP 3.6?

    Thanks for the bug report.

    This is already on the to-do list

  • Here, in the attachment, is my settings for taxonomy fields.

    The bug occurs on regular webhosting as well as on local installation. Both Multisite version of WP 3.6.

    Plugins I’m using:
    Members
    Multisite User Management
    Peter’s Post Notes
    WordPress Importer

    Theme:
    Required+

    EDIT: The bug also occurs on regular clean WP 3.6 installation with Twenty Thirteen theme.

  • This is an issue with WP1.6, I think.

    I ran into the same problem when writing a custom import script. It seems when running wp_set_post_terms you must use term names (slugs) rather than IDs.

    Only the categories taxonomy uses IDs, now.

    Ref: http://codex.wordpress.org/Function_Reference/wp_set_post_terms

    It seems the ACF plugin is setting the terms using the term IDs, rather than the slug. If that’s the case, should be a simple fix. 🙂

  • Okay, it was a simple fix. Until an patch is released for ACF, you can do the following:

    Open up [WP DIR]/wp-content/plugins/advanced-custom-fields/core/fields/taxonomy.php

    Edit lines 415, 419 and 424 and replace value="' . $term->id . '" with value="' . $term->slug . '"

    Hope that helps. 🙂

  • Since the code of taxonomy.php is same in 4.1.8 and in 4.2, why does it happen only while running 4.2? Both on WP 3.6..

    Anyway, thx for fix, I ll give it try.

  • Yeah fix does the trick. Interesting question about 4.1.8 and in 4.2

    Thanks tomsel

  • Hey guys,

    This has been fixed in 4.2.1

    Thanks
    E

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

The topic ‘Taxonomy load value creating new term’ is closed to new replies.