Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
For several menu items, print_menu is setting the 'access' parameter to an array of permissions (6.x-style), instead of calling user_access, which is not right, and means even users with sufficient permissions can't access.
The cleanest fix is to just delete the 'access' parameter on these items, so that Drupal uses the access settings of the parent menu item, which should be the same. Here's a patch:
Index: print.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/print/print.module,v
retrieving revision 1.15.2.5.2.29.2.62.2.30
diff -u -r1.15.2.5.2.29.2.62.2.30 print.module
--- print.module 20 Aug 2009 02:19:06 -0000 1.15.2.5.2.29.2.62.2.30
+++ print.module 12 Oct 2009 14:14:06 -0000
@@ -127,7 +127,6 @@
'title' => t('Text strings'),
'callback' => 'drupal_get_form',
'callback arguments' => array('print_html_strings_settings'),
- 'access' => array('administer print'),
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
@@ -136,7 +135,6 @@
'title' => t('Settings'),
'callback' => 'drupal_get_form',
'callback arguments' => array('print_main_settings'),
- 'access' => user_access('administer print'),
'weight' => 10,
'type' => MENU_LOCAL_TASK,
);
@@ -151,7 +149,6 @@
'title' => t('Text strings'),
'callback' => 'drupal_get_form',
'callback arguments' => array('print_main_strings_settings'),
- 'access' => array('administer print'),
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedHi,
The 'administer print' is there for a reason. I have changed the code to use the Drupal 5 syntax and not the Drupal 6 syntax that came from the backport of this functionality.
The fix will be shortly in the 5.x-dev version.
João