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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | vocabulary_update-2469951-2.patch | 668 bytes | trobey |
| #1 | voc_update-2469951-1.patch | 1.19 KB | archnode |
Comments
Comment #1
archnode commentedAnd the patch for the proposed changes.
Comment #2
trobey commentedThanks 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.
Comment #4
trobey commented