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

Files: 
CommentFileSizeAuthor
#4 2118101-wb-access-missing-dependency-ui-3.patch2.64 KBbbinkovitz
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2118101-wb-access-missing-dependency-ui-3.patch. Unable to apply patch. See the log in the details link for more information. View
#1 2118101-wb-access-missing-dependency-ui.patch2.64 KBbbinkovitz
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2118101-wb-access-missing-dependency-ui.patch. Unable to apply patch. See the log in the details link for more information. View
Screen Shot 2013-10-22 at 5.12.41 PM.png79.87 KBbbinkovitz

Comments

bbinkovitz’s picture

FileSize
2.64 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2118101-wb-access-missing-dependency-ui.patch. Unable to apply patch. See the log in the details link for more information. View

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
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2118101-wb-access-missing-dependency-ui-3.patch. Unable to apply patch. See the log in the details link for more information. View

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.