Request window
Request window
After updating to V. 4.2.0 the window where the request from an employee changed and we are not able to see the request anymore.
Ever since I installed Timetrex no update cause this problem. Can you please help me?
Thank you
Ever since I installed Timetrex no update cause this problem. Can you please help me?
Thank you
Re: Request window
No such version (v4.2.0) of TimeTrex exists, what version are you really using? Also what version did you upgrade from?
Re: Request window
I am so sorry... I really dont know where I got that from... is V3.4.0shaunw wrote:No such version (v4.2.0) of TimeTrex exists, what version are you really using? Also what version did you upgrade from?
Re: Request window
When you are viewing the request, are you doing it from a supervisor login with the purpose of authorizing the request? Or from an employee login with the purpose of just viewing the request itself?
Re: Request window
Either with the Administrator or the Supervisors level the same window appear. I check the Group Permissions on both levels and they have everything enabled in the Request subject.shaunw wrote:When you are viewing the request, are you doing it from a supervisor login with the purpose of authorizing the request? Or from an employee login with the purpose of just viewing the request itself?
Re: Request window
Is it possible that the window is too small for everything that is supposed to be in it?
Can you stretch the window, and see more in it?
Can you stretch the window, and see more in it?
Re: Request window
There is nothing else... I maximised it but thats everything shown. After updating my installation to the newest version this started to happen.noamparn wrote:Is it possible that the window is too small for everything that is supposed to be in it?
Can you stretch the window, and see more in it?
Re: Request window
If you are logged in a supervisor/administrator, you should at least be seeing the Authorize/Decline buttons. If you aren't its likely that you don't have the Request -> Authorize permission allowed.guanaco wrote:Either with the Administrator or the Supervisors level the same window appear. I check the Group Permissions on both levels and they have everything enabled in the Request subject.shaunw wrote:When you are viewing the request, are you doing it from a supervisor login with the purpose of authorizing the request? Or from an employee login with the purpose of just viewing the request itself?
Have you modified the permissions at all?
Re: Request window
I have never touched the permissions.shaunw wrote:If you are logged in a supervisor/administrator, you should at least be seeing the Authorize/Decline buttons. If you aren't its likely that you don't have the Request -> Authorize permission allowed.guanaco wrote:Either with the Administrator or the Supervisors level the same window appear. I check the Group Permissions on both levels and they have everything enabled in the Request subject.shaunw wrote:When you are viewing the request, are you doing it from a supervisor login with the purpose of authorizing the request? Or from an employee login with the purpose of just viewing the request itself?
Have you modified the permissions at all?
This is the permission layout of the Administrator (My account)
Re: Request window
Is this happening for all requests, even requests submitted after the upgrade to v3.4.0?
Re: Request window
This is happening for all requests, even the ones submitted prior the upgradeshaunw wrote:Is this happening for all requests, even requests submitted after the upgrade to v3.4.0?
Re: Request window
When viewing the request, can you please view the HTML source and attach the entire source here.
Re: Request window
shaunw wrote:When viewing the request, can you please view the HTML source and attach the entire source here.
Code: Select all
<html>
<head>
<link rel="stylesheet" href="/timetrex/interface/global.css.php" type="text/css" />
<title>TimeTrex</title>
<SCRIPT language=JavaScript src="/timetrex/interface/global.js.php" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript>
function help_window(group) {
help=window.open('/timetrex/interface/help/WindowViewHelp.php?script='+ encodeURI(group) +'&title='+ encodeURI('View Request'),"Help","toolbar=0,status=1,menubar=0,scrollbars=1,fullscreen=no,width=400,height=600,resizable=1");
}
</SCRIPT>
</head>
<body id="body" onLoad="fixWidth();;firstElementFocus();">
<a name="top"></a>
<!-- End Header --><script language=JavaScript>
function fixWidth() {
resizeWindowToFit( document.getElementById('body'), 'both' );
}
function viewTimeSheet(userID,dateStamp) {
window.opener.location.href = '/timetrex/interface/timesheet/ViewUserTimeSheet.php?filter_data[user_id]='+ encodeURI(userID) +'&filter_data[date]='+ encodeURI(dateStamp);
}
</script>
<div id="rowContent">
<div id="titleTab"><div class="textTitle"><span class="textTitleSub">View Request</span></div>
</div>
<div id="rowContentInner">
<form method="post" name="wage" action="/timetrex/interface/request/ViewRequest.php">
<div id="contentBoxTwoEdit">
<table class="editTable">
<tr>
<td class="cellLeftEditTable">
Employee: </td>
<td class="cellRightEditTable">
Jorge Ramirez
</td>
</tr>
<tr onClick="showHelpEntry('date_stamp')">
<td class="cellLeftEditTable">
Date: </td>
<td class="cellRightEditTable">
23-Feb-11 [ <a href="javascript:viewTimeSheet('18','1298440800');">View TimeSheet</a> ]
</td>
</tr>
<tr onClick="showHelpEntry('type_id')">
<td class="cellLeftEditTable">
Type: </td>
<td class="cellRightEditTable">
Punch Adjustment
</td>
</tr>
<tr>
<td colspan="2">
This is the code of the ViewRequest.tpl file
Code: Select all
{include file="sm_header.tpl" body_onload="fixWidth();"}
<script language=JavaScript>
{literal}
function fixWidth() {
resizeWindowToFit( document.getElementById('body'), 'both' );
}
function viewTimeSheet(userID,dateStamp) {
window.opener.location.href = '{/literal}{$BASE_URL}{literal}timesheet/ViewUserTimeSheet.php?filter_data[user_id]='+ encodeURI(userID) +'&filter_data[date]='+ encodeURI(dateStamp);
}
{/literal}
</script>
<div id="rowContent">
<div id="titleTab"><div class="textTitle"><span class="textTitleSub">{$title}</span></div>
</div>
<div id="rowContentInner">
<form method="post" name="wage" action="{$smarty.server.SCRIPT_NAME}">
<div id="contentBoxTwoEdit">
{if !$rf->Validator->isValid()}
{include file="form_errors.tpl" object="rf"}
{/if}
<table class="editTable">
<tr>
<td class="cellLeftEditTable">
{t}Employee:{/t}
</td>
<td class="cellRightEditTable">
{$data.user_full_name}
</td>
</tr>
<tr onClick="showHelpEntry('date_stamp')">
<td class="{isvalid object="rf" label="datestamp" value="cellLeftEditTable"}">
{t}Date:{/t}
</td>
<td class="cellRightEditTable">
{getdate type="DATE" epoch=$data.date_stamp} [ <a href="javascript:viewTimeSheet('{$data.user_id}','{$data.date_stamp}');">{t}View TimeSheet{/t}</a> ]
</td>
</tr>
<tr onClick="showHelpEntry('type_id')">
<td class="{isvalid object="rf" label="type" value="cellLeftEditTable"}">
{t}Type:{/t}
</td>
<td class="cellRightEditTable">
{$data.type}
</td>
</tr>
<tr>
<td colspan="2">
{embeddedauthorizationlist object_type_id=50 object_id=$data.id}
</td>
</tr>
{if $data.authorized == FALSE AND $permission->Check('request','authorize') }
<tr class="tblHeader">
<td colspan="2"> 1
<input type="submit" class="button" name="action:decline" value="{t}Decline{/t}">
<input type="submit" class="button" name="action:pass" value="{t}Pass{/t}">
<input type="submit" class="button" name="action:authorize" value="{t}Authorize{/t}">
</td>
</tr>
{/if}
</table>
</div>
<input type="hidden" name="request_id" value="{$data.id}">
<input type="hidden" name="selected_level" value="{$selected_level}">
<input type="hidden" name="request_queue_ids" value="{$request_queue_ids}">
</form>
</div>
</div>
{if $data.id != ''}
<br>
<br>
<div id="rowContent">
<div id="titleTab"><div class="textTitle"><span class="textTitleSub">{t}Messages{/t}</span></div>
</div>
<div id="rowContentInner">
<div id="contentBoxTwoEdit">
<table class="tblList">
<tr>
<td>
{embeddedmessagelist object_type_id=50 object_id=$data.id}
</td>
</tr>
</table>
</div>
</div>
{/if}
{* {include file="footer.tpl"} *}
Re: Request window
Have you tried clearing your TimeTrex cache, as well as your browser cache?
Re: Request window
Just did that and nothing changed... this happens in several "supervisors" level computers besides mine.noamparn wrote:Have you tried clearing your TimeTrex cache, as well as your browser cache?
Re: Request window
The fact that the HTML source is being cut off leads me to believe there is a PHP error happening somewhere that is halting execution of the script before the end. Have you checked your PHP error logs for any clues?
How did you install TimeTrex originally, with our automated installer or from the .ZIP file?
What operating system is TimeTrex running on?
How did you install TimeTrex originally, with our automated installer or from the .ZIP file?
What operating system is TimeTrex running on?
Re: Request window
I installed it with the .zip file, I am running it on Ubuntu Server 10.04. It was working fine until I upgrade to this version... All previous updates did not generate this behaivior.shaunw wrote:The fact that the HTML source is being cut off leads me to believe there is a PHP error happening somewhere that is halting execution of the script before the end. Have you checked your PHP error logs for any clues?
How did you install TimeTrex originally, with our automated installer or from the .ZIP file?
What operating system is TimeTrex running on?
In the PHP logs I am getting this error:
[Wed Feb 23 13:38:33 2011] [error] [client 10.10.3.20] PHP Fatal error: Call to a member function getById() on a non-object in /var/www/timetrex/classes/smarty/libs/plugins/function.embeddedauthorizationlist.php on line 23, referer: http://10.10.254.51/timetrex/interface/ ... geList.php
Re: Request window
I have just modified the file /var/www/timetrex/classes/smarty/libs/plugins/function.embeddedauthorizationlist.phpguanaco wrote:I installed it with the .zip file, I am running it on Ubuntu Server 10.04. It was working fine until I upgrade to this version... All previous updates did not generate this behaivior.shaunw wrote:The fact that the HTML source is being cut off leads me to believe there is a PHP error happening somewhere that is halting execution of the script before the end. Have you checked your PHP error logs for any clues?
How did you install TimeTrex originally, with our automated installer or from the .ZIP file?
What operating system is TimeTrex running on?
In the PHP logs I am getting this error:
[Wed Feb 23 13:38:33 2011] [error] [client 10.10.3.20] PHP Fatal error: Call to a member function getById() on a non-object in /var/www/timetrex/classes/smarty/libs/plugins/function.embeddedauthorizationlist.php on line 23, referer: http://10.10.254.51/timetrex/interface/ ... geList.php
Code: Select all
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
function smarty_function_EmbeddedAuthorizationList($params, &$smarty)
{
global $current_company, $current_user;
$object_type_id = $params['object_type_id'];
$object_id = $params['object_id'];
$ulf = new UserListFactory();
$hlf = new HierarchyListFactory();
$hotlf = new HierarchyObjectTypeListFactory();
$alf = new AuthorizationListFactory();
$alf->setObjectType($object_type_id);
//$authorizing_obj = $alf->getObjectHandler()->getById( $object_id )->getCurrent();
[b]//[/b] $tmp_authorizing_obj = $alf->getObjectHandler()->getById( $object_id );
if ( is_object($tmp_authorizing_obj) ) {
Should this generate any other problem in other section? I will give it a try and let you know if something gets messed up.
Re: Request window
if fact something got wrong... after I click on "Authorize" a page blank is displayed and nothing else happens... I checked again the errors and have a similar one [Thu Feb 24 09:35:33 2011] [error] [client 10.10.3.20] PHP Notice: Undefined index: object_type_id in /var/www/timetrex/classes/modules/core/AuthorizationFactory.class.php on line 208, referer: http://10.10.254.51/timetrex/interface/ ... php?id=182. If I perform the same thing the error gets somewhere else but basically is an error that starts from the first one.guanaco wrote:I have just modified the file /var/www/timetrex/classes/smarty/libs/plugins/function.embeddedauthorizationlist.phpguanaco wrote:I installed it with the .zip file, I am running it on Ubuntu Server 10.04. It was working fine until I upgrade to this version... All previous updates did not generate this behaivior.shaunw wrote:The fact that the HTML source is being cut off leads me to believe there is a PHP error happening somewhere that is halting execution of the script before the end. Have you checked your PHP error logs for any clues?
How did you install TimeTrex originally, with our automated installer or from the .ZIP file?
What operating system is TimeTrex running on?
In the PHP logs I am getting this error:
[Wed Feb 23 13:38:33 2011] [error] [client 10.10.3.20] PHP Fatal error: Call to a member function getById() on a non-object in /var/www/timetrex/classes/smarty/libs/plugins/function.embeddedauthorizationlist.php on line 23, referer: http://10.10.254.51/timetrex/interface/ ... geList.phpI added the "//" on the $tmp_authorizing_obj sentence (line 23) and the request window is now displayed completely.Code: Select all
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ function smarty_function_EmbeddedAuthorizationList($params, &$smarty) { global $current_company, $current_user; $object_type_id = $params['object_type_id']; $object_id = $params['object_id']; $ulf = new UserListFactory(); $hlf = new HierarchyListFactory(); $hotlf = new HierarchyObjectTypeListFactory(); $alf = new AuthorizationListFactory(); $alf->setObjectType($object_type_id); //$authorizing_obj = $alf->getObjectHandler()->getById( $object_id )->getCurrent(); [b]//[/b] $tmp_authorizing_obj = $alf->getObjectHandler()->getById( $object_id ); if ( is_object($tmp_authorizing_obj) ) {
Should this generate any other problem in other section? I will give it a try and let you know if something gets messed up.
Can yo give me a hand with this?
Re: Request window
I don't recommend making changes to the code unless you are an experienced programmer and know exactly what you are doing.
The changes that you have already made will break things even more and possibly cause corruption problems that can be difficult or impossible to fix later.
I don't think the root cause of the problem is in that file. It almost appears that your database wasn't upgraded properly to begin with.
What database and version are you using?
The changes that you have already made will break things even more and possibly cause corruption problems that can be difficult or impossible to fix later.
I don't think the root cause of the problem is in that file. It almost appears that your database wasn't upgraded properly to begin with.
What database and version are you using?
Re: Request window
I removed all changes already. I am using MySQL version 5.1.41shaunw wrote:I don't recommend making changes to the code unless you are an experienced programmer and know exactly what you are doing.
The changes that you have already made will break things even more and possibly cause corruption problems that can be difficult or impossible to fix later.
I don't think the root cause of the problem is in that file. It almost appears that your database wasn't upgraded properly to begin with.
What database and version are you using?
Re: Request window
Checking your posts more closely, your ViewRequest.tpl file does not match the file included in the TimeTrex v3.4.0 .ZIP file. So it appears that when you upgraded TimeTrex you didn't do it properly and missed some files. Its possible that there are other files that were missed as well and it could cause you all sorts of problems.
I would recommend unzipping the TimeTrex v3.4.0 .ZIP file overtop of your existing TimeTrex directory and confirming that all files are overwritten properly. It may have been a permission problem, so it may be helpful to do this when logged in as root.
I would recommend unzipping the TimeTrex v3.4.0 .ZIP file overtop of your existing TimeTrex directory and confirming that all files are overwritten properly. It may have been a permission problem, so it may be helpful to do this when logged in as root.
Re: Request window
Performing this action. I will post the result in a momentshaunw wrote:Checking your posts more closely, your ViewRequest.tpl file does not match the file included in the TimeTrex v3.4.0 .ZIP file. So it appears that when you upgraded TimeTrex you didn't do it properly and missed some files. Its possible that there are other files that were missed as well and it could cause you all sorts of problems.
I would recommend unzipping the TimeTrex v3.4.0 .ZIP file overtop of your existing TimeTrex directory and confirming that all files are overwritten properly. It may have been a permission problem, so it may be helpful to do this when logged in as root.
Re: Request window
I really dont know what happened at the moment of upgrade since I have upgraded Timetrex several times already. I did what you asked and everything is working properly now.
I appreciate all your help team, you rock!
I appreciate all your help team, you rock!