default landing page code is not working

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sticcino
User
Posts: 1043

default landing page code is not working

Post by sticcino »

v2019. I have a custom page "dashboard" that is set as the default landing page...

when the index class is created, it is not set to that as requested.
i created another custom page and after regeneration, when you look at the index.php it set that newly created file as the default

not sure if that "default" checkbox on the tables page is to specify the "default" page to display when logging on.

Generated:
// 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() . '_FIRST_FILE_IN_LIST.php'))
		$this->terminate("daemons/_FIRST_FILE_IN_LIST.php"); // Exit and go to default page

should be:

    if ($Security->allowList(CurrentProjectID() . 'dashboard.php'))
        $this->terminate("dashboard.php"); // Exit and go to default page

from what it appears, it seems its using the first "custom file" in that listing as the "default" page.


arbei
User
Posts: 9434

Post by arbei »

You may double check the "Default" table in the Tables setup page and the "Start page" setting in the Generate tab, then generate index.php again.


sticcino
User
Posts: 1043

Post by sticcino »

thanks.. that didn't turn out too good.

Too many page redirects when dashboard.php set to "start' page in generate page.

Default check next to dashboard.php
start page = index.php

generated code:

...
$Security->loadUserLevel(); // Load User Level
if ($Security->allowList(CurrentProjectID() . 'AssignContractorToWorkOrder.php'))
$this->terminate("
AssignContractorToWorkOrder.php");
...

that file noted above is the first listed in the custom files section. when reviewing the code in index.php, it did not even have a reference to dashboard.php or create and entry for it, the file was created via phpmaker and does have security permissions in the security tables.

strange.


arbei
User
Posts: 9434

Post by arbei »

If you set dashboard.php as "Default", there is no need to set the Start Page.


mobhar
User
Posts: 11765

Post by mobhar »

  1. You may actually refer to the demo project file that you can download and test it in your local machine.

  2. As you can see, in that demo project, "home.php" is a Custom File. It is set as the landing page, from "Generate" -> "Start page".

  3. Since it is now setup as the landing/start/default page, then make sure there are no table are set as "Default" from "Tables" pane.


Post Reply