Support

Account

Home Forums Bug Reports Bug relationship between taxonomy and users

Helping

Bug relationship between taxonomy and users

  • Hi,

    I found a bug in the relationship between a custom taxonomy and the users.
    I have a custom taxonomy ‘genres’ with an assigned field group with a field for assigned users.

    Name: ‘rel_users’
    Field Type: User
    Select Multiple: True
    Bidirectional Target Field: rel_genres

    A second field group is assigned to ‘users’ and has a field for assigned taxonomy.

    Name: ‘rel_genres’
    Field Type: Taxonomy
    Appearance: Multi Select
    Bidirectional Target Field: rel_users

    If I assign a user to a genre term, everything is ok.
    term_id: 15
    user_id: 5

    wp_usermeta
    meta_key: rel_genres
    meta_value: a:1:{i:0;s:2:”15″;}

    wp_termmeta
    meta_key: rel_users
    meta_value: a:1:{i:0;s:1: “5”;}

    In the backend the relations are displayed correctly in the user profile and on the taxonomy edit page.

    However, when I make changes on the taxonomy edit page, the target value is changed incorrectly (when I delete, save and reassign the user) so that the assignment in the user profile disappears. When saving the taxonomy term, the bidirectional target field is now saved as an interger array instead of string array.

    wp_usermeta
    meta_key: rel_genres
    meta_value: a:1:{i:0;i:15;} <- integer array!

    wp_termmeta (unchanged)
    meta_key: rel_users
    meta_value: a:1:{i:0;s:1: “5”;}

    It seems that the array with integer values destroys the relationship on the side of the user.

    best regards
    steffen

  • This does appear to be a bug because all ACF relationship type fields expect that the stored array will be an array of stings for the ID values.

    The developers do not monitor this forum for bugs. Yes, I know the forum title says “Bug Reports” but this was created many, many years ago when the developer managed this forum.

    You should contact the developers directly or open a ticket under your account.

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

You must be logged in to reply to this topic.