Country and State drop-down lists missing on EditUser.php

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
mklell
Posts: 4
Joined: Wed Oct 31, 2007 5:05 pm

Country and State drop-down lists missing on EditUser.php

Post by mklell »

I successfully installed version 2.1 on a Windows 2003 server using IIS, MySQL and PHP 5.2.4. The first time I login, I get the screen for first time login and I must complete the following information. On this screen, the country and province/state drop-down lists are completely missing. There is nothing showing in the php logs. The timetrex logs are below.

---------------[ Thu, 01 Nov 2007 17:11:16 +0000 (PID: 2616) ]---------------
DEBUG [249]: <b>[Function]()</b>: URI: /interface/users/EditUser.php?id=1&incomplete=1<br>
DEBUG [251]: <b>[Function]()</b>: Production: 1<br>
DEBUG [100]: <b>TTDate::setTimeZone()</b>: Setting TimeZone: GMT<br>
DEBUG [497]: <b>Authentication::Check()</b>: Session Name: SessionID<br>
DEBUG [503]: <b>Authentication::Check()</b>: Session ID: b49fe24355189d3444e4b4084bb2433c<br>
DEBUG [399]: <b>Validator::stripNonAlphaNumeric()</b>: Alpha Numeric String:b49fe24355189d3444e4b4084bb2433c<br>
DEBUG [78]: <b>Authentication::getIdle()</b>: Idle Seconds Allowed: 14400<br>
DEBUG [399]: <b>Validator::stripNonAlphaNumeric()</b>: Alpha Numeric String:b49fe24355189d3444e4b4084bb2433c<br>
DEBUG [69]: <b>[Function]()</b>: User Authenticated: admin Created Date: 1193937074<br>
DEBUG [1903]: <b>UserFactory::isInformationComplete()</b>: User Information is NOT Complete: <br>
DEBUG [100]: <b>TTDate::setTimeZone()</b>: Setting TimeZone: GMT<br>
DEBUG [129]: <b>TTDate::setDateFormat()</b>: Setting Default Date Format: <br>
DEBUG [143]: <b>TTDate::setTimeFormat()</b>: Setting Default Time Format: <br>
DEBUG [157]: <b>TTDate::setTimeUnitFormat()</b>: Setting Default Time Unit Format: <br>
DEBUG [100]: <b>[Function]()</b>: Locale Cookie: en_US<br>
DEBUG [235]: <b>TTi18n::getLanguageFromLocale()</b>: Locale: en_US<br>
DEBUG [102]: <b>[Function]()</b>: Changing User Preference Language to match cookie...<br>
DEBUG [235]: <b>TTi18n::getLanguageFromLocale()</b>: Locale: en_US<br>
DEBUG [94]: <b>Validator::inArrayKey()</b>: Key: en<br>
DEBUG [739]: <b>Factory::isValid()</b>: Calling Validate()<br>
DEBUG [503]: <b>Validator::Error()</b>: Validation Error: Label: date_format Msg: Incorrect date format<br>
DEBUG [482] Array: <b>Validator::isValid()</b>: Errors
<pre>
Array
(
[date_format] => Array
(
[0] => Incorrect date format
)

)
</pre><br>
DEBUG [270]: <b>TTi18n::setLocale()</b>: Attempting to set Locale to: en_US Category: 0 Current Locale: <br>
DEBUG [273]: <b>TTi18n::setLocale()</b>: Attempting to set Locale to: en_US<br>
DEBUG [275]: <b>TTi18n::setLocale()</b>: Failed setting i18n locale: en_US<br>
DEBUG [279]: <b>TTi18n::setLocale()</b>: Failed setting normalized i18n locale: en_US<br>
DEBUG [291]: <b>TTi18n::setLocale()</b>: Setting translator normalized locale to: en_US<br>
DEBUG [309]: <b>TTi18n::setLocale()</b>: Set Locale To: en_US<br>
DEBUG [1903]: <b>UserFactory::isInformationComplete()</b>: User Information is NOT Complete: <br>
DEBUG [136]: <b>[Function]()</b>: Station ID Cookie found! 30fa3e5a44fceddcd4a68ba2f49decba<br>
DEBUG [243]: <b>[Function]()</b>: UnRead Messages: 0<br>
DEBUG [83]: <b>[Function]()</b>: aCompany ID: <br>
DEBUG [390]: <b>[Function]()</b>: bCompany ID: <br>
DEBUG [394]: <b>[Function]()</b>: cCompany ID: 1<br>
DEBUG [397]: <b>[Function]()</b>: ID IS set<br>
DEBUG [48]: <b>BreadCrumb::setCrumb()</b>: Dropping Bread Crumb: Edit Employee URL: /interface/users/EditUser.php?id=1&incomplete=1<br>
DEBUG [420]: <b>[Function]()</b>: Title: <br>
DEBUG [342]: <b>FastTree::getAllChildren()</b>: Getting Root ID: 0<br>
---------------[ Thu, 01 Nov 2007 17:11:16 +0000 (PID: 2616) ]---------------
---------------[ Thu, 01 Nov 2007 17:11:17 +0000 (PID: 2616) ]---------------
DEBUG [249]: <b>[Function]()</b>: URI: /interface/ajax_server.php?client=all&stub=AJAX_Server<br>
DEBUG [251]: <b>[Function]()</b>: Production: 1<br>
DEBUG [100]: <b>TTDate::setTimeZone()</b>: Setting TimeZone: GMT<br>
DEBUG [497]: <b>Authentication::Check()</b>: Session Name: SessionID<br>
DEBUG [503]: <b>Authentication::Check()</b>: Session ID: b49fe24355189d3444e4b4084bb2433c<br>
DEBUG [399]: <b>Validator::stripNonAlphaNumeric()</b>: Alpha Numeric String:b49fe24355189d3444e4b4084bb2433c<br>
DEBUG [78]: <b>Authentication::getIdle()</b>: Idle Seconds Allowed: 14400<br>
DEBUG [399]: <b>Validator::stripNonAlphaNumeric()</b>: Alpha Numeric String:b49fe24355189d3444e4b4084bb2433c<br>
DEBUG [69]: <b>[Function]()</b>: User Authenticated: admin Created Date: 1193937074<br>
DEBUG [1903]: <b>UserFactory::isInformationComplete()</b>: User Information is NOT Complete: <br>
DEBUG [100]: <b>TTDate::setTimeZone()</b>: Setting TimeZone: GMT<br>
DEBUG [129]: <b>TTDate::setDateFormat()</b>: Setting Default Date Format: <br>
DEBUG [143]: <b>TTDate::setTimeFormat()</b>: Setting Default Time Format: <br>
DEBUG [157]: <b>TTDate::setTimeUnitFormat()</b>: Setting Default Time Unit Format: <br>
DEBUG [100]: <b>[Function]()</b>: Locale Cookie: en_US<br>
DEBUG [235]: <b>TTi18n::getLanguageFromLocale()</b>: Locale: en_US<br>
DEBUG [102]: <b>[Function]()</b>: Changing User Preference Language to match cookie...<br>
DEBUG [235]: <b>TTi18n::getLanguageFromLocale()</b>: Locale: en_US<br>
DEBUG [94]: <b>Validator::inArrayKey()</b>: Key: en<br>
DEBUG [739]: <b>Factory::isValid()</b>: Calling Validate()<br>
DEBUG [503]: <b>Validator::Error()</b>: Validation Error: Label: date_format Msg: Incorrect date format<br>
DEBUG [482] Array: <b>Validator::isValid()</b>: Errors
<pre>
Array
(
[date_format] => Array
(
[0] => Incorrect date format
)

)
</pre><br>
DEBUG [270]: <b>TTi18n::setLocale()</b>: Attempting to set Locale to: en_US Category: 0 Current Locale: <br>
DEBUG [273]: <b>TTi18n::setLocale()</b>: Attempting to set Locale to: en_US<br>
DEBUG [275]: <b>TTi18n::setLocale()</b>: Failed setting i18n locale: en_US<br>
DEBUG [279]: <b>TTi18n::setLocale()</b>: Failed setting normalized i18n locale: en_US<br>
DEBUG [291]: <b>TTi18n::setLocale()</b>: Setting translator normalized locale to: en_US<br>
DEBUG [309]: <b>TTi18n::setLocale()</b>: Set Locale To: en_US<br>
DEBUG [1903]: <b>UserFactory::isInformationComplete()</b>: User Information is NOT Complete: <br>
DEBUG [136]: <b>[Function]()</b>: Station ID Cookie found! 30fa3e5a44fceddcd4a68ba2f49decba<br>
DEBUG [55]: <b>[Function]()</b>: AJAX Server called...<br>
---------------[ Thu, 01 Nov 2007 17:11:17 +0000 (PID: 2616) ]---------------
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

The country options should never be blank. It sounds like something is seriously wrong with your installation if thats the case.

During the installation process, was the country/province options blank when you entered the company information?
mklell
Posts: 4
Joined: Wed Oct 31, 2007 5:05 pm

Post by mklell »

At first during the installation I had the problem where none of the province/state options were visible, but the country had options. Then after looking through the forums I discovered my timetrex.ini.php base url was incorrect. I modified this and then I had the province/state options. I was then able to finish my installation. With this problem I am having the drop-down boxes do not even appear on the page for country or province/state.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Province/State not showing up is relatively common because it uses AJAX to load, so its much more complex then just the country options.

The country options are just a straight dropdown box though, so them not showing up is very strange. Can you try a different web browser? Also try viewing the source of the page and see if any countries or errors appear there.
mklell
Posts: 4
Joined: Wed Oct 31, 2007 5:05 pm

Post by mklell »

I will post the source code showing country below. There were no errors present. Also this source code came from viewing the page in Firefox which produced the same results.

<script language=JavaScript>

var loading = false;
var hwCallback = {
getProvinceOptions: function(result) {
if ( result != false ) {
province_obj = document.getElementById('province');
selected_province = document.getElementById('selected_province').value;

populateSelectBox( province_obj, result, selected_province);
}
loading = false;
}
}

var remoteHW = new AJAX_Server(hwCallback);

function showProvince() {
country = document.getElementById('country').value;
remoteHW.getProvinceOptions( country );
}


</script>

HTML piece of code

<tr onClick="showHelpEntry('country')">
<td class="cellLeftEditTable">

Country: </td>
<td class="cellRightEditTable">

<input type="hidden" name="user_data[country]" value="">
</td>
</tr>

<tr onClick="showHelpEntry('province')">
<td class="cellLeftEditTable">
Province / State: </td>

<td class="cellRightEditTable">

<input type="hidden" name="user_data[province]" value="">
<input type="hidden" id="selected_province" value="">
</td>
</tr>
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

<input type="hidden" name="user_data[country]" value="">
</td>
</tr>
What happened to the rest of the <input> tag there? Are you sure you didn't miss something? Perhaps if you scroll to the right of the "View Source" page?

If not, then something is definitely wrong as you are missing random bits of HTML code.

Have you checked your PHP error log?

As a test, I would try our Windows installer to see if it works any better. It will create a completely separate instance of TimeTrex so you can run both at the same time to compare.
mklell
Posts: 4
Joined: Wed Oct 31, 2007 5:05 pm

Post by mklell »

Thanks for your help. We are implementing all of our new systems on MySQL 5.1.21 since the production release is right around the corner. I decided to try and eliminate that as the problem. We have a production environment running 5.0.37. I changed the database to connect to that server and everything worked correctly. We were hoping to decommission MySQL 5.0 soon and utilize the new features of 5.1. For now I will keep it running until I hear further support details. Also on a side note about the EditUser page, the entire left column of Employee Identification was hidden and I was only seeing the Contact Information column, very strange.
Locked