I created a module as pr. http://drupaldojo.com/files/screencasts/drupal-dojo_minilesson8.mov to redo the login procedures. I then created the following module granadalogin with the code:

Code for granadalogin.module

<?php
// $Id$
        /**
         * Implementation of hook_menu().
        */
function granadalogin_menu($may_cache) {
        $items = array();
        if ($may_cache) {
        }

        else {
                $items = array (
                                'path'                  => 'granadalogin/login',
                                'title'                 => t('Log in'),
                                'description'           => t('Ajax callback'),
                                'callback'              => 'granadalogin_login_page',
                                'callback arguments'    => array(),
                                'access'                => $user->uid == 0,
                                'type'                  => MENU_NORMAL_ITEM,
                               );
        }

        return $items;
}

function granadatheme_login_page() {
        print drupal_get_form("user_login");
        exit;
}

?>

contents of granadalogin.info:

; $Id$
name = Granada Login
description = Gives the jquery login link a clean page to access
core = 6.x

After trying to enable this module everything went sour, shutting out my superuser giving access denied error messages everywhere and now I'm stuck, desperatly in search for help. Could anybody help, please?

Comments

grobemo’s picture

Based on your code, it looks like the tutorial you're using is for Drupal 5.x. There are some changes to the structure of menu items in Drupal 6.x. See this page on converting your modules from 5.x to 6.x.

To restore access, try removing the granadalogin.module and granadalogin.info from your Drupal file structure. (You should also check to ensure that there is no whitespace before or after your <?php ?> tags in granadalogin.module.

One more thing: Shouldn't your callback function be called granadalogin_login_page, not granadatheme_login_page?

If you're still having problems, let us know.

vonfaff’s picture

... I just managed to sort the problem, seems the system module data was corrupt. I ran update.php and did a update on the database and I managed to restore access.

Based on your code, it looks like the tutorial you're using is for Drupal 5.x. There are some changes to the structure of menu items in Drupal 6.x. See this page on converting your modules from 5.x to 6.x.

That struck me after I ran into the problems, but then it was too late :-|

To restore access, try removing the granadalogin.module and granadalogin.info from your Drupal file structure. (You should also check to ensure that there is no whitespace before or after your tags in granadalogin.module.

I did that, but that didn't work anyways got it sorted now. Thank you again for replying to my call for help so fast :D

Edit: BTW, i'll be sure to backup my DB before playing with this any further ;)