Login problem from QA-Website module action block.

Bug #311909 reported by sco
2
Affects Status Importance Assigned to Milestone
ideatorrent
New
Undecided
Unassigned

Bug Description

Version: IdeaTorrent 0.9

I have ideatorrent available from http://mysite/ideatorrent and it is not set as default landingpage so users will have to navigate to it from the drupal menu. Users can browse the site unauthenticated but when they do that and click the "submit your idea" link in the QA-Website module action block they run into problems.

Steps:

1. Browse to http://yoursite/ideatorrent as unauthenticated user.
2. Click "Submit your idea" in the QA-Website module action block.
3. Get redirected to "http://yoursite/user?destination=submit/". Fill in correct username and pw. Click login
4. Get redirected to "http://yoursite/submit/" This will be a 404 since the expected page is http://yoursite/ideatorrent/submit.

The problem here seems to be that the redirection to the login page is passed with the path parameter "submit" instead of "ideatorrent/submit".

Note that if the user is already authenticated before he press "Submit your idea" everything goes well and the user is taken to http://yoursite/ideatorrent/submit.

The same problem can be observed on "http://demo.ideatorrent.org/" Follow that link. Click "submit your idea". Log in as user/user and you will be taken to a blank page (404 in my case).

Discussion on #ubuntu-brainstorm indicates that this can be a problem in votebox.php

Revision history for this message
sco (stefan-cohen) wrote :

The problem seems to be in /modules/ideatorrent/themes/brownie/menublock/default.php in the following section:

--------------
<table style="margin: 0px 0px 0px 8px; height:50px"><tr><td>
<a href="<?php
if(user_access($GLOBALS['site']->getData()->userrole))
        echo $GLOBALS['basemodule_url'] . $GLOBALS['basemodule_prefilter_path'] . "/submit/";
else
        echo $GLOBALS['base_url'] . "/user?destination=" . substr($GLOBALS['basemodule_prefilter_path'] . "/submit/", 1);

?>" class="blacklink2" >
<img src="<?php echo "/" . $this->getThemePath(); ?>/images/ideamail.png" alt="Submit your idea">
</a>
--------------
I don't know much about php but i guess that " substr($GLOBALS['basemodule_prefilter_path'] " doesn't return the right value??
Must learn php ;)

Revision history for this message
Nicolas Deschildre (ndeschildre) wrote :

Hey, you're right!
I'll be correcting this right away.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.