This topic is locked
[SOLVED]

  Error Message PHPR 6.1

4/23/2012 11:06:45 AM
PHPRunner General questions
T
taumic author

Hello PHPR`s
I build a PHPR 6.0 project with PHPR 6.1 and get the following error-message:
"Fatal error: Call to undefined function GetOriginalTableName() in D:\xampplite\htdocs\Alaska_61\include\events.php on line 81"

  • Line 81 = "$table=GetOriginalTableName($table);"
  • the function "getOriginalTableName()" is declared in /classes/projectsettings.php as following:
    function getOriginalTableName()

    {

    $result = $this->getTableData(".OriginalTable");

    return $result != "" ? $result : $this->_table;

    }
    So what can I do, to build my project in PHPR 6.1 ?
    Many thanks
    Michael

Sergey Kornilov admin 4/23/2012

Michael,
I would suggest to send your project and database to our support staff for investigation.

T
taumic author 4/25/2012

Hello Sergej,
it is a very big projekt with lots of tables and thus difficult to transfer.

But I have a reverence:
The problem is in the "MenueItem:modify"-Section, where i put this code, to see the number of records:


if($menuItem->getLinkType() == 'Internal')

{

global $tables_data;

$table=$menuItem->getTable();

include_once(getabspath("include/".GetTableURL($table)."_settings.php"));

$table=GetOriginalTableName($table);

$rs=CustomQuery("select count(*) as c from " . AddTableWrappers($table));

$data = db_fetch_array($rs);

$menuItem->setTitle($menuItem->getTitle() . " (". $data["c"] . ")");

}

return true;


In PHPR 6.0 all is well, but I have the error with PHPR 6.1
Has anyone an idea?
Thank you
Michael

Sergey Kornilov admin 4/25/2012

Michael,
my suggestion is to get the latest build of PHPRunner 6.1 and create a small test project using the code in question. If issue is still there - post it to Demo Account and we'll be glad to assist you.

T
taumic author 5/8/2012

Hello Sergey,
a small test project with the code (and the error) is on the DEMO ACCOUNT. Sorry for the delay!
Michael

Sergey Kornilov admin 5/8/2012

Did you open a ticket sending your Demo Account URL?

T
taumic author 5/11/2012

Thanks to Jane:
================

this issue happens because there is no GetOriginalTableName function in this version. You need to modify your code. Find this line:

------------------------

$table = GetOriginalTableName($table);

------------------------

and replace it with this one:

------------------------

$gSettings = new ProjectSettings($table, $menuItem->getPageType());

$table = $gSettings->GetOriginalTableName();

------------------------

in the 'Menu item: Modify' event.

================
Now the project is ok again!
Michael