default page not being set

been though this a few times…

we have a custom page dashboard.php that should be accessed when a user logons – everyone has perms to it.

the dashboard.php is set as the default
start page is blank:

the following code is generated in index.php

// If session expired, show session expired message
if (Get(“expired”) == “1”)
$this->setFailureMessage($Language->phrase(“SessionExpired”));
if (!$Security->isLoggedIn())
$Security->autoLogin();
$Security->loadUserLevel(); // Load User Level
if ($Security->allowList(CurrentProjectID() . ‘act_expense_stmnts’))
$this->terminate(“act_expense_stmntslist.php”); // Exit and go to default page

why did it set the default to: act_expense_stmnts ???

if the start page is set as dashboard.php then the browser goes into a too many redirects error:

the following is generated in index.php:

// If session expired, show session expired message
if (Get(“expired”) == “1”)
$this->setFailureMessage($Language->phrase(“SessionExpired”));
$this->terminate(“dashboard.php”); // Exit and go to default page

which results in:

This page isn’t working localhost redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

We have to manually alter:
if ($Security->allowList(CurrentProjectID() . ‘act_expense_stmntslist’))
$this->terminate(“act_expense_stmntslist.php”); // Exit and go to default page
TO
if ($Security->allowList(CurrentProjectID() . ‘dashboard’))
$this->terminate(“dashboard.php”); // Exit and go to default page

everything then works perfectly, including login and session timeout

That is probably because you have set the default table as “act_expense_stmnts” but set the start page as “dashboard”. If “dashboard” is a report, you just need to set it as the default table.

Hi arbei

that’s the whole thing, that code was generated by php maker,

the default is set to a custom file called “dashboard.php”, there’s a check mark on the default checkbox.

that table act_expense_stmntslist.php is the very first table in the list, could it be phpm doesn’t like custom files as a default ?

addition:

nowhere in the generated index.php classes is there any reference to “dashboard.php” - when start page = “” and “default” is selected for the dashboard page

and…
the generated list of terminate statements (if ($Security->allowList(…)), contains all the tables and views, but not one single custom file… when the above scenario is generated.

Did you enable “Include common files” option when you created that Custom File?