This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

problem with menu_execute_active_handler or me?

I am writing my first custom module for drupal 5.

my menu item looks like this:

        $items[] = array(
          'access'             => $access,
          'callback'           => 'drupal_get_form',
          'callback arguments' => 'vcsshop_delete',
          'path'               => 'admin/content/vcsshop/delete',
          'title'              => t('Delete catalog item'),
          'type'               => MENU_CALLBACK,
        );

the link you click on looks like: http://example.com/index.php?q=admin/content/vcsshop/delete/2

I get lots of errors and stuff when I click it. I tracked the problem to menu_execute_active_handler in menu.inc. The code:

  // We found one, and are allowed to execute it.
  $arguments = isset($menu['callbacks'][$path]['callback arguments']) ? $menu['callbacks'][$path]['callback arguments'] : array();
  $arg = substr($_GET['q'], strlen($path) + 1);
  if (strlen($arg)) {
    $arguments = array_merge($arguments, explode('/', $arg));
  }

$arguments is a string, not an array, so array_merge complains. I see in the php doc's that in php5 it was changed to require arrays. I changed the code to this:

  // We found one, and are allowed to execute it.
  $arguments = isset($menu['callbacks'][$path]['callback arguments']) ? Array($menu['callbacks'][$path]['callback arguments']) : array();

Custom Module Required

I was wondering if there is anyway to create a form or node that would display information entered into the form. However an authenticated user would be able to edit it without being given the ability to be an admin. I need to have this solved as soon as possible. I can provide you with more information.

variable_get returns nothing

I am developing a module to perform some action after user logs in to the system for the first time. I ran on quite strange problem. This is the code of hook_settings of my module:

thought for today: don't change role name for "anonymous user"

So... last week I was irritated with just how big the access control table had gotten at admin/access, and I decided it would help to take the word "user" out of the role names for "anonymous user" and "authenticated user" (to save a little space so I didn't have to left-right scroll it). The roles page said "locked" at me but I wasn't about to be turned away that easily. So, I just changed the names in the roles table in the database. I tested the site after so doing and nothing seemed to be broken, so I left it.

Now, I have path_access installed and in heavy use. The reason I originally installed it was to prevent users from seeing teaser lists of otherwise restriced content--at node for example. Today, after adding a path to restrict for anonymous users, I discovered that it didn't work anymore. In fact, none of it worked anymore. Bits of sensitive information from all over my site were publicly viewable in teasers.

Sports Management System

I would like to see if somebody could create a module to manage Hockey League websites. It would function like Leaguestat.com,Pointstreak.com, and adjuvo.com. However it would allow for customization and use in other sports.

WSDL server by Drupal

I can't fount module for WSDL server. I need setup WSDL server on my side by drupal. Can I setup it by XML-RPC service? But I seen that it is different syntax between WSDL and XML-RPC.
Thanks.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions