This topic is locked
[SOLVED]

 PHPRunner 5.2 Vs PHPRunner 5.3

1/15/2011 1:23:52 AM
PHPRunner General questions
Q
qaiserikram author

Dear Team,

First of all thanks for this wonderful product.
There is a bug in all the builds of PHPRunner 5.3 including the latest one (7113).

Calculation on the fly only work on Add and Edit Pages under 5.3 but won't work on Inline Add and Inline Edit page.
But when I re-generated my project with the help of PHPRunner 5.2 Build 5482, everything is fine,

All the pages (Add, Edit, Inline Add, Inline Edit) are working (calculating on the fly) as they should be.

Sergey Kornilov admin 1/15/2011

It should work on inline pages as well. Probably there something specific to your project that causes this issue.
You can post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

Q
qaiserikram author 1/17/2011

But the same project with same settings/customizations is working well in PHPRunner 5.2.
Let Me Explain This.

I generated the same project with 5.2 and 5.3 editions.

Inline Add and Inline Edit (calculations on the fly) work on 5.2 generated code, and these functions don't work under 5.3 editions.

Inline Add and Inline Edit is working on all versions.
UNDER 5.3 build 7113 edition this code is disabled in add.php

// add onload event

//$onLoadJsCode = GetTableData($pageObject->tName, ".jsOnloadAdd", '');

//$pageObject->addOnLoadJsEvent($onLoadJsCode);
While it is not disabled in 5.2.
I think there may be some other code in other source files that may be disabled in 5.3 source code.

/////////////////////////////////////////////////////////////////////////////////////////////////
Further Another Bug:
A lot of user complained that "RECORD UPDATED" "RECORD ADDED" Message are not being displayed. It's True
If Record Updated message is not being shown, then please delete or comment out the ending code, "return true;" from phpfunctions.php file
if ( $inlineedit )

{

$status="UPDATED";

$message=""."Record updated"."";

$IsSaved = true;

}

else

$message="<div class=message><<< "."Record updated"." >>></div>";

if($usermessage!="")

$message = $usermessage;

return true; ..........................delete this (PHPRunner 5.1, 5.2, 5.3 Editions)

}
/////////////////////////////////////////////
If Record was added message is not being shown, then please delete the ending code, "return true;" from phpfunctions.php file
if ( $inlineedit==ADD_INLINE )

{

$status="ADDED";

$message=""."Record was added"."";

$IsSaved = true;

}

else

$message="<div class=message><<< "."Record was added"." >>></div>";

if($usermessage!="")

$message = $usermessage;

if($inlineedit==ADD_INLINE || $inlineedit==ADD_ONTHEFLY || function_exists("AfterAdd"))

{

$failed_inline_add = false;

$keyfields=GetTableKeys();

foreach($keyfields as $k)

{

if(array_key_exists($k,$avalues))

$keys[$k]=$avalues[$k];

elseif(IsAutoincField($k))

{

$keys[$k]=mysql_insert_id($conn);

}

else

$failed_inline_add = true;

}

}

return true;..........................delete this (PHPRunner 5.1, 5.2, 5.3 Editions)

}
But when i delete or comment out the above code, all the messages are being displayed on localhost and online server, but inline add stops working.

Sergey Kornilov admin 1/17/2011

I won't be able to tell you what's right or what's wrong looking at this code. If you need help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program..

Q
qaiserikram author 1/17/2011

Dear Admin
Thanks for your support.

Nothing is wrong with this code as it is core PHPRunner Generated code.

I am trying to say that there is some code mistake in original code, you may comparison your original source code files for this purpose.
I have just pointed out one example. (Though i've sorted it out).
Further Another Issue :

When we select "User Can Edit Own Record and See the Other Users Data" (Security Setting), and choose that key field on Add Page, (though PHPrunner deselects that key field automatically, but if we enable/re-select it on Field Options then PHPRunner displays its default value i.e. table owner code which is also equal to $_SESSION["UserID"]<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=55757&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />... So if we delete that code, nothing happens. Though PHPrunner shows that default value is deleted, but when we generate the project, it automatically adds $_SESSION["UserID"]. No Matter you type TEST or Example it will fetch only the Logged In Users ID into that field.
And all this is done by

// insert ownerid value if exists

if($strOriginalTableName == GetFieldData($strTableName, "##@TABLE.strMainTableOwnerID s##", "ownerTable", ""))

$avalues["##@TABLE.strMainTableOwnerID s##"]=prepare_for_db("##@TABLE.strMainTableOwnerID s##",$SESSION["".$strTableName."_OwnerID"]);
WORST SCENARIO of Above Function:

Suppose if we have joined two tables with the same key field, which are selected as ownerid key, then all the database is messed up. As PHPRunner adds ownerid value by default, so it is impossible to match the key fields of both tables. i.e. Logged In User ID (who actually added the data) can never be equal to customer or employee id.
NOTE : I'm a great FAN of You People, So Don't Take my POSTS as Negative. In fact, I want PHPRunner to be ERROR FREE.