1

I am following drupal's module development tutorials. I am using drupal 7.41 and my operating system is ubuntu.

I am creating a module that list links in the footer section of the page. I am making an admin configuration for my module. I have done everything what the tutorial said and I went to my configuration page, I couldn't see my configuration button of my module in admin/config/content. Here is my hook_menu() implementation:

function footer_links_menu() {
$items = array();

$items['admin/config/content/footer_links'] = array(
    'title' => 'Footer Links',
    'description' => 'Configuration for Footer links posts module',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('footer_links_form'),
    'access arguments' => array('access administration pages'),
    'type' => MENU_NORMAL_ITEM,
);

return $items;
}

I have manually tried to access to admin/config/content/footer_links, I got a permission denied error. However, I was already logged in as the admin. I have changed the value of access arguments to array('access content'). And it worked. What was the problem? If I leave my code like this, can others also edit my module through the form? Thanks in advance.

0

Try to change

'access arguments' => array('access administration pages'),

into

'access arguments' => array('administer site configuration'),

2
  • Why did this worked? What is the difference from the array('access administration pages')?
    – Bora Semiz
    Nov 3 '15 at 11:27
  • It is like access content and create article content. List of permissions is in table role_permission Nov 3 '15 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.