You are here

function _forum_access_forum_troubleshooting_form in Forum Access 7

1 call to _forum_access_forum_troubleshooting_form()
_forum_access_forum_form in ./forum_access.admin.inc
Rewrite the forum administration page with our new access rules.

File

./forum_access.admin.inc, line 462
forum_access.admin.inc

Code

function _forum_access_forum_troubleshooting_form($is_container, $has_interference) {
  if (!$is_container) {
    $tr = 't';
    $l = 'l';
    $variables = array(
      '!Forum_Access' => $l('Forum Access', 'http://drupal.org/project/forum_access'),
      '!ACL' => $l('ACL', 'http://drupal.org/project/acl'),
      '%Module_interference' => t('Module interference'),
      '!Forum_Access-dev' => $l('Forum Access 7.x-1.x-dev', 'http://drupal.org/node/964638', array(
        'html' => TRUE,
      )),
      '!ACL-dev' => $l('ACL 7.x-1.x-dev', 'http://drupal.org/node/694210', array(
        'html' => TRUE,
      )),
      '%devel_node_access' => 'devel_node_access',
      '!Devel' => $l('Devel', 'http://drupal.org/project/devel'),
      '!DNA' => 'DNA',
      '!debug_mode' => $l('debug mode', 'admin/config/development/devel', array(
        'fragment' => 'edit-devel-node-access-debug-mode',
      )),
      '!block' => $l('block', 'admin/structure/block/list'),
      '!dna_summary' => $l('devel/node_access/summary', 'devel/node_access/summary'),
      '!Rebuild_permissions' => $l($tr('Rebuild permissions'), 'admin/reports/status/rebuild'),
      '!Forum_Access_' => $l('Forum Access', 'http://drupal.org/project/issues/forum_access'),
      '!ACL_' => $l('ACL', 'http://drupal.org/project/issues/acl'),
    );
    $form = array(
      '#type' => 'fieldset',
      '#title' => t('Trouble-shooting node access'),
      '#collapsible' => TRUE,
      '#collapsed' => TRUE,
    );
    $form[] = array(
      '#type' => 'item',
      '#markup' => '<div>' . t("In case of problems, follow these steps until you've got it worked out:") . '<ol style="margin-top: 0"><li>' . t("Update to the 'recommended' !Forum_Access and !ACL releases for your version of Drupal.", $variables) . '</li><li>' . ($has_interference ? t("Read %Module_interference above and update your other node access modules.", $variables) . '</li><li>' : '') . t("Check the release notes of the development snapshots for issues that might have been fixed in !Forum_Access-dev or !ACL-dev since the latest release.", $variables) . '</li><li>' . t("Install the %devel_node_access module (!DNA, part of the !Devel module) and enable its !debug_mode: !DNA will show you all the grants that actually control your nodes in a footer block on each node's page.", $variables) . '</li><li>' . t("Additional insight can be gained from !dna_summary and by enabling the second !DNA !block.", $variables) . '</li><li>' . t("!Rebuild_permissions and check DNA for changes.", $variables) . '</li><li>' . t("Check the issues queues of !Forum_Access_ and !ACL_ for existing reports and possible solutions.", $variables) . '</li><li>' . t("If all of this hasn't helped, then pick ONE node that is misbehaving, look at it using an account that can see the node (and that should NOT have access if that's your problem!), create a new issue in the issues queue, describe the problem... <ul><li> what did you do? </li><li> what did you expect? </li><li> what happened instead? </li></ul> ... and <strong>attach a screenshot of all the DNA records</strong> for that one node. <br /> Be sure to indicate paths (URLs) for every page and module that you mention.") . '</li></ol><br />' . t("Note: You should not keep the !Devel module enabled on a production site.", $variables) . '</div>',
    );
    return $form;
  }
}