If you have more then one term in a vocabulary, removing access to any term removes access to the whole vocabulary. The attached patch fixes this and will be committed shortly.

CommentFileSizeAuthor
required_vocabulary_fix.patch2.17 KBdeviantintegral

Comments

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

lordzik’s picture

Status: Closed (fixed) » Active

Hello,

$total_terms = count($vocabulary['#options']) - 1;
This is wrong. If an user have permissions for only one term in a vocabulary and a new eg. story requires at least one term to be selected then Drupal does not allow an user to create new content.

Changing to this resolves the problem:
$total_terms = count($vocabulary['#options']);

Regards.

Anonymous’s picture

Status: Active » Reviewed & tested by the community

it solved the problem

deviantintegral’s picture

Status: Reviewed & tested by the community » Closed (fixed)

I opened a new issue at #1369522: Fix off-by-one error when users have access to only one term for this given how long this had been closed. In the future, when an issue has been marked as closed, it's better to post a new issue linking back to the old one.