Dashboard: Redirect Loop problem

A place for users and developers of the Xataface to discuss and receive support.

Dashboard: Redirect Loop problem

Postby sophistry » Sat Apr 04, 2009 12:20 pm

Has anyone installed the Dashboard before? I'm in the process of installing a dashboard, and I've run into one minor problem, so I'm wondering if anyone else has had a similar issue.

Everything seems to be set up fine, and if I'm logged in I can see and edit whatever I need to on my dashboard. When I log out, I get a redirect loop error in firefox.

However! Changing this line in my conf/ApplicationDelegate.php:
Code: Select all
         $query['-action'] = 'dashboard';

to
Code: Select all
         $query['-action'] == 'dashboard';


brings the page back and allows me to log in again ... except now the Dashboard is showing the actual dashboard table. Though, I believe I'm actually just breaking that query to tell DF to use the dashboard action. However, after I've logged in I can take out that one = and save, then reload the page and now be logged in and showing the dashboard perfectly again.

It must be looping the function for the dashboard in Application Delegate, but I can't figure out how to stop it from looping. this is the code (which comes after my getPermissions function:

Code: Select all
   function beforeHandleRequest(){
      $app =& Dataface_Application::getInstance();
      $query =& $app->getQuery();
      if ( $query['-table'] == 'dashboard' ){
         $query['-action'] = 'dashboard';
      }
   }


If anyone has run into this issue while setting up a dashboard from the tutorial, let me know what fixed it.

Thanks,
Rory
sophistry
 
Posts: 27
Joined: Mon May 19, 2008 11:20 am

Postby shannah » Sun Apr 12, 2009 10:33 am

Try changing the code to:
Code: Select all
$app =& Dataface_Application::getInstance();
$query =& $app->getQuery();
if ( $query['-table'] == 'dashboard' and ($query['-action'] == 'browse' or $query['-action'] == 'list') ){
    $query['-action'] = 'dashboard';
}


I'll look at the dashboard tutorial and see if it needs changing.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby sophistry » Mon Apr 13, 2009 6:24 am

Worked like a charm, Steve.

Thanks a lot!
Rory
sophistry
 
Posts: 27
Joined: Mon May 19, 2008 11:20 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 15 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved