Project:User Points Contributed modules
Version:5.x-3.0
Component:Code: user2userpoints
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Hi there,

When enabling the user2userpoints component, an uneditable entry on the navigational menu named "Give Points" is created.

The problem is that it is IMPOSSIBLE to remove or relocate this entry, because when "Administer > Menus" (or admin/build/menu) is accessed, the "Give Points" entry disappears on the menu, and therefore is not shown in the menu administration page.

Additionally, ALL roles (including anonymous) are able to view this faulty entry.

In order to reproduce this problem, enable the user2userpoints component, and try to remove or relocate the "Give Points" entry on the navigation menu.

Thanks for your help!

Comments

#1

Priority:critical» normal

In user2userpoints.module edit this:

<?php
    $items
[] = array(
     
'path'               => 'user2userpoints',
     
'title'              => t('Give !points', userpoints_translation()),
     
'callback'           => 'drupal_get_form',
     
'callback arguments' => array('user2userpoints_giveform'),
     
'access'             => array(USER2USERPOINTS_PERM_SEND),
    );
?>

To this:

<?php
    $items
[] = array(
     
'path'               => 'user2userpoints',
     
'title'              => t('Give !points', userpoints_translation()),
     
'callback'           => 'drupal_get_form',
     
'callback arguments' => array('user2userpoints_giveform'),
     
'access'             => array(USER2USERPOINTS_PERM_SEND),
     
'type'    => MENU_SUGGESTED_ITEM,
    );
?>

See if this fixes it.

#2

Status:active» postponed (maintainer needs more info)

#3

Status:postponed (maintainer needs more info)» fixed

Hi there,

Thanks for your quick reply.

Your suggested modification fixes this problem, as the unwanted entry is removed.

In order to edit it though, I needed to manually create a new menu link that linked to "user2userpoints", and place it on a menu.

However, your fix works perfectly for my purposes.

Thanks for your help!

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#5

Status:closed (fixed)» active

Could the menu problem be implemented so that it is e regular menu item that is there from the beginning so that you just can say who may have access?

Maybe an entry in the access control would be nice too.

Greetz
Jan

#6

Status:active» closed (won't fix)

Sorry for pinging the participants.

Now that Drupal 7 is out, there is no support for Drupal 5 and the
corresponding modules anymore. Therefore, I'm closing all old issues
which are still open.

I suggest you upgrade to Drupal 6 or 7 and figure out if you're feature
is still needed or the bug still exists and open a new issue in that
case.

nobody click here