Dashboard: Redirect Loop problem
Archived from the Xataface Users forum.
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
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.
sophistry — Mon Apr 13, 2009 6:24 am
Worked like a charm, Steve.
Thanks a lot!
Rory