function roleassign_admin_setttings() doesn't work for Drupal 4.7, apart from the typo of two many 't's, the function is also wrongly named. It should be function roleassign_settings()

Comments

budda’s picture

Also noticed the same typo in return system_settings_form('roleassign_admin_setttings', $form); at end of function.

budda’s picture

To get the settings page to render in Drupal 4.7 you need to change:-
return system_settings_form('roleassign_admin_settings', $form);
should be:
return $form;

This makes the form visible. Sorry no patches for all this, on a tight deadline!

TBarregren’s picture

Assigned: Unassigned » TBarregren
Priority: Normal » Minor
Status: Active » Closed (fixed)

This is not a bug.

Take a closer look on the code, particular roleassign_menu(), and you will see that the settings page is a local task on the admin/access page. The function is not implementing the hook_settings(). That's the reason for calling system_settings_form() and not just return $form as you propose.

To make it really clear that the callback function isn't supposed to implement the hook_settings, I have changed the name from roleassign_admin_set[t]tings() to roleassign_admin().

budda’s picture

Status: Closed (fixed) » Active

Ah okay, right :) Explains that then.

However using the latest 4.7 tagged version from CVS, I get a blank page when visiting ?q=admin/access/roleassign when there are no additional roles defined on the test site. Surely a user friendly message should be shown?

TBarregren’s picture

Status: Active » Closed (fixed)

Indeed, a user friendly message should be shown when there are no additional roles defined. I have added a message for that case. I have also added a short introduction how to use the page.

Thanks for being patient with me. :-)