won't list available roles on "apply for role" page

CtrlAltDel911 - March 7, 2008 - 00:06
Project:Apply for role
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Soren Jones
Status:closed
Description

installed the module and set the permissions so that all existing roles have access to "apply for role"; only admin role has access to the administer and approve functions. On the "Apply for role administration" page I selected four out of 10 existing roles for which logged-in users can apply.

On the My Account -> Apply for role page the only thing that's displayed is: "No roles are available at this time."

Doesn't matter who's logged in or his/her existing role, that's all that will display; also disabled all other contributed modules and no change. Tried both 5.x-1.0 and -1.x-dev versions with Drupal 5.7.

Any suggestions? Have I overlooked something obvious in the set-up?

#1

Soren Jones - March 7, 2008 - 00:16

Go to admin/settings/apply_for_role (or Administer >> Site configuration >> Apply for role administration) to enable roles for the Apply for role module.

#2

Soren Jones - March 7, 2008 - 00:26

This is a significant usability issue. Maybe user 1 or anyone with administer apply for role permissions should be provided with a link to admin/settings/apply_for_role from user/%/apply_for_role if there are no roles configured.

#3

svilen - March 7, 2008 - 08:25

The roles displayed on my account -> apply for role will be filtered by the roles user already have.

#4

CtrlAltDel911 - March 7, 2008 - 20:00

As I described above, I did select several roles to make them available to Apply for Role; I think the UI and readme.txt file are both more than adequate.

I just can't get it to work no matter what I try, including activating it on a virgin Drupal install with no other non-code modules. Could this be a PHP-related problem? The server is running 5.2.5 w/ Zend memory mgr enabled.

I did try ver 6.x-1.x on a Drupal 6 test-bed installation on my notebook and that worked OK; it did throw an error on the admin/settings/apply_for_role page until I checked at least one role, but after that it worked as advertised.

#5

CtrlAltDel911 - March 9, 2008 - 21:38

3/9/2008 Update: OK, after experimenting some more, I'm curious if *anyone* has successfully installed this module on Drupal 5.7 because it just does not seem to work.

As a test I created a brand new physical hosting account for an unused domain, installed Drupal 5.7 and enabled Apply for Role as the only module (other than those enabled by the Drupal install); after configuring the module and its permissions, it still displays "No roles are available at this time."

I then deleted everything from the server and database and repeated the exact same process w/ Drupal 6 and the Apply for Role module worked almost flawlessly. FWIW, I think there's a significant problem w/ the 5.x version.

#6

Soren Jones - March 10, 2008 - 00:20

Line 208
-if (!is_array($filter_roles)) {
+if (is_array($filter_roles)) {

I'll submit a patch later.

#7

Soren Jones - March 10, 2008 - 00:34

CtrlAltDel911,

I misread your original post. I should have read it more carefully. I'm not using 5.x-1.0 or -1.x-dev. But if I'd read your original problem more carefully I would have realized something was up. Anyway, thank you for your persistence.

Soren

#8

Soren Jones - March 10, 2008 - 01:00
Component:User interface» Code
Category:support request» bug report
Assigned to:Anonymous» Soren Jones
Status:active» needs review

A patch against -dev.

AttachmentSize
apply_for_role.module.patch 787 bytes

#9

svilen - March 10, 2008 - 18:10

yes. a stupid bug.
v.5 dev is now commited with the patch.

#10

Soren Jones - March 19, 2008 - 13:46
Status:needs review» fixed

CtrlAltDel911,

Thanks again for your persistence on this one.

#11

Anonymous (not verified) - April 2, 2008 - 13:52
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.