• Resolved parakeet

    (@parakeet)


    I think I have found an issue, and I’m curious whether anyone has solved it…

    On a backend User profile edit page…

    If a User already has a checked taxonomy term, but I want to uncheck it to have NO value once more, the User profile REFUSES to save with no term value. Instead, it just represents with the same value checked, time and time again.

    However, if I CHANGE the checked term value, LH User Taxonomies does accept this and saves the new value.

    So, how can I hope to unset a term?

    Does this relate to the following portion from line 442… ?

    			// Removing
    			} elseif ( 'remove' === $action ) {
    				$index = array_search( $term, $update_terms );
    				if ( isset( $update_terms[ $index ] ) ) {
    					unset( $update_terms[ $index ] );
    				}
    			}

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter parakeet

    (@parakeet)

    The pull request at https://github.com/shawfactor/lh-user-taxonomies/pull/12 seems to fix this.

    Plugin Author shawfactor

    (@shawfactor)

    I have finally fixed this issue in the latest version I realeased just then (available from the repository). I wrote my own code rather than used the github pull though as I could not follow the committ logic (it may be good, just could not follow). Anyway should work now but please test and let me know, how you find it.

    pete

    Plugin Author shawfactor

    (@shawfactor)

    Note removing terms will still not work where single_value is set to true, as the assumption is a value is required (I do not yet have a required argument)

    Plugin Author shawfactor

    (@shawfactor)

    @parakeet have you had a chance to look at this?

    Thread Starter parakeet

    (@parakeet)

    Oh, hi @shawfactor.
    Good to bake it in.
    Haven’t tried it yet, but looking forward to when I can.
    I think I’ll also have to rip out one of the other commits I manually pasted in, because I’m not kind of git user.

    Thanks!
    I’ll circle back.

    Thread Starter parakeet

    (@parakeet)

    Hi @shawfactor
    Yes, this seems to work. I tried it.
    Good one.

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

The topic ‘Bug?: Unsetting values on save doesn’t work’ is closed to new replies.