I installed Workbench Access on a site that had neither Menu nor Taxonomy enabled. On the Workbench Access admin screen, instead of some kind of error message, I just saw a field label for a required field, with no options.

Screen Shot of workbench access not having any radio buttons

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bbinkovitz’s picture

The attached patch displays a message to the user to enable taxonomy or menu if the $options array for the active schemata is empty, instead of displaying the form.

bbinkovitz’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2118101-wb-access-missing-dependency-ui.patch, failed testing.

bbinkovitz’s picture

Status: Needs work » Needs review
FileSize
2.64 KB

It helps if there aren't typos in the patch.

Status: Needs review » Needs work

The last submitted patch, 2118101-wb-access-missing-dependency-ui-3.patch, failed testing.

agentrickard’s picture

Checking why that failed testing.

agentrickard’s picture

Worked for me.

agentrickard’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: 2118101-wb-access-missing-dependency-ui-3.patch, failed testing.

jiv_e’s picture

Issue summary: View changes

Why doesn't workbench_access add taxonomy and menu as dependencies?

agentrickard’s picture

Because neither is required, and you can also use other access schemes that aren't part of this release.

jiv_e’s picture

Ok! It's just that I got an error because of undefined function or undefined property without taxonomy installed. I already enabled taxonomy and didn't copy the error message (<-- stupid). I was in hurry and have my build dependent of taxonomy now. Also don't have time to reproduce the error. I still add my quess where the error came from, if it's worth anything.

Inside workbench_access.module:

function workbench_access_menu_alter(&$items) {
  // Hide our taxonomy view pages.
  $items['taxonomy/term/%taxonomy_term']['access callback'] = 'workbench_access_taxonomy_page_access'; // HERE...
  $items['taxonomy/term/%taxonomy_term']['access arguments'] = array(2); // HERE...
...
function workbench_access_configuration(&$form, &$form_state) {
  $options = array();
  $vocabularies = taxonomy_get_vocabularies(); // ...OR HERE.
agentrickard’s picture

That makes sense.