When updating the sort order of vocabulary terms after saving a vocabulary itself it seems that the vocabulary_update hook is called. This resets the private status of the vocabulary to false, as the vocabulary object has no private property.

As one can't assume the presence of a private property in the object I propose a slightly more cautious update hook that only updates an existing vocabulary if the property is set.

Comments

archnode’s picture

StatusFileSize
new1.19 KB

And the patch for the proposed changes.

trobey’s picture

StatusFileSize
new668 bytes

Thanks for bringing this up. I have occasionally noticed this but have not chased it down. I am a bit worried about your changes causing other problems. The issue is that when the private property is not set I assumed that there is no entry in the database table and I set the property to false. So I added a check to see if the vocabulary is private (which means it already has an entry in the database table). This should be a bit safer than your patch. Check and see if this works for you.

  • trobey committed 028f376 on 7.x-1.x
    Issue #2469951 by archnode, trobey: Vocabulary update hook resets...
trobey’s picture

Status: Needs review » Closed (fixed)