Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7895425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:38:26+00:00 2026-06-03T07:38:26+00:00

I am using drupal 7 and entity_registration module ( registration-7.x-1.0-alpha5) for event registration. There

  • 0

I am using drupal 7 and entity_registration module ( registration-7.x-1.0-alpha5) for event registration.

There the register link is displayed for the specific role only i.e. if permission is set for authenticated user, them the register link is displayed to the authenticated users.

If we try to manually visit the page for example node/9/register it shows access denied.

Now, I have using LoginToboggan redirected access denied page to user login page. But when I manually create a menu item Named Register having path node/9/register, the menu item itself is not displaying.

I want a way to tell users to login to register or something like that..

I hope you got my point.

Here is the module file code.. I think there is some problem in formatting so I have pasted just hook_menu and hook_permission functions..please visit the link for viewing full code http://www.karyashala.in/code.html

    /**

     * Implements hook_menu().

     */

    function registration_menu() {

      $items['registration/%registration'] = array(

        'title callback' => 'registration_page_title',

        'title arguments' => array(1),

        'page callback' => 'registration_view',

        'page arguments' => array(1),

        'access callback' => 'entity_access',

        'access arguments' => array('view', 'registration', 1),

      );

      $items['registration/%registration/view'] = array(

        'title' => 'View',

        'page callback' => 'registration_view',

        'page arguments' => array(1),

        'access callback' => 'entity_access',

        'access arguments' => array('view', 'registration', 1),

        'type' => MENU_DEFAULT_LOCAL_TASK,

      );

      $items['registration/%registration/edit'] = array(

        'title' => 'Edit',

        'page callback' => 'drupal_get_form',

        'page arguments' => array('registration_form', 1),

        'access callback' => 'entity_access',

        'access arguments' => array('update', 'registration', 1),

        'weight' => 10,

        'type' => MENU_LOCAL_TASK,

      );

      $items['registration/%registration/delete'] = array(

        'title' => 'Delete',

        'page callback' => 'drupal_get_form',

        'page arguments' => array('registration_delete_confirm', 1),

        'access callback' => 'entity_access',

        'access arguments' => array('delete', 'registration', 1),

        'type' => MENU_CALLBACK,

      );



      // entity local tasks

      foreach (registration_get_registration_instances() as $instance) {

        $type = $instance['entity_type'];

        if (!in_array($type, array('registration', 'registration_type'))) {

          $items[$type . '/%entity_object/register'] = array(

            'load arguments' => array($type),

            'title' => 'Register',

            'page callback' => 'registration_register_page',

            'page arguments' => array(0, 1),

            'access callback' => 'registration_register_page_access',

            'access arguments' => array(0, 1),

            'type' => MENU_LOCAL_TASK,

          );

          $items[$type . '/%entity_object/registrations'] = array(

            'load arguments' => array($type),

            'title' => 'Manage Registrations',

            'page callback' => 'registration_registrations_page',

            'page arguments' => array(0, 1),



                            'access callback' => 

            'registration_administer_registrations_access',

            'access arguments' => array(0, 1),

            'type' => MENU_LOCAL_TASK,

          );

          $items[$type . '/%entity_object/registrations/list'] = array(

            'load arguments' => array($type),

            'title' => 'Registrations',

            'page callback' => 'registration_registrations_page',


                    'page arguments' => array(0, 1),

            'access callback' => 'registration_administer_registrations_access',


                    'access arguments' => array(0, 1),




                                    'type' => MENU_DEFAULT_LOCAL_TASK,


                  );

          $items[$type . '/%entity_object/registrations/settings'] = array(

            'load arguments' => array($type),

            'title' => 'Settings',

            'page callback' => 'drupal_get_form',

            'page arguments' => array('registration_registrations_settings_form', 0, 
    1),

            'access callback' => 'registration_administer_registrations_access',

            'access arguments' => array(0, 1),

            'weight' => 9,

            'type' => MENU_LOCAL_TASK,

          );

          $items[$type . '/%entity_object/registrations/broadcast'] = array(

            'load arguments' => array($type),

            'title' => 'Email Registrants',

            'page callback' => 'drupal_get_form',

            'page arguments' => array('registration_registrations_broadcast_form', 0, 
    1),

            'access callback' => 'registration_administer_registrations_access',

            'access arguments' => array(0, 1),

            'weight' => 10,

            'type' => MENU_LOCAL_TASK,

          );

        }

      }



      if (module_exists('devel')) {

        $items['registration/%registration/devel'] = array(

          'title' => 'Devel',

          'page callback' => 'devel_load_object',

          'page arguments' => array('node', 1),

          'access arguments' => array('access devel information'),

          'type' => MENU_LOCAL_TASK,

          'file path' => drupal_get_path('module', 'devel'),

          'file' => 'devel.pages.inc',

          'weight' => 100,

        );

        $items['registration/%registration/devel/load'] = array(

          'title' => 'Load',

          'type' => MENU_DEFAULT_LOCAL_TASK,

        );

      }



      return $items;

    }



    /**

     * Implements hook_permission().

    */

    function registration_permission() {

      $permissions = array(

        'administer registration types' => array(

          'title' => t('Administer registration types'),

          'description' => t('Manage registration types, fields, and display 
    settings.'),

          'restrict access' => TRUE,


                ),

        'administer registration' => array(

          'title' => t('Administer registration'),

          'description' => t('View, edit, delete, and manage all registrations, 
    regardless of type.'),

          'restrict access' => TRUE,


                ),

      );



      foreach(registration_get_types() as $type_info) {

        $permissions += registration_permission_list($type_info);

      }




      return $permissions;

    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:38:27+00:00Added an answer on June 3, 2026 at 7:38 am
    Add the line after + sign and clear cache after that check it again.
    function registration_menu() {
      $items['registration/%registration'] = array(
        'title callback' => 'registration_page_title',
        'title arguments' => array(1),
        'page callback' => 'registration_view',
        'page arguments' => array(1),
        'access callback' => 'entity_access',
        'access arguments' => array('view', 'registration', 1),
    +   'type' => MENU_NORMAL_ITEM,
      );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good Evening, I'm using Drupal 6, CCK Module, and the Link Field Type. All
I am using Drupal Location module in CCK to retreive longitude & latitude based
I'm using Drupal for a website, and I've a link "Unselect All" to deselect
I'm using Drupal 7 and Views module in my site. And want show number
I'm using Drupal 6 and its core comment module. I want to run a
I'm using Drupal and Lightbox module to display the content of articles in this
I'm using Drupal for a website and I can only use jQuery 1.2.7 (not
I'm using Drupal autoresponder module - and I want to use tokens so I
I am using Drupal Webform 6.x-2.9 - is there a way (some code snippet
Although I am using drupal since the D4 series, I only started developing professionally

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.