Getting JavaScript in IE7

Topics brought up by the TimeTrex open source community.
Locked
jlim
Posts: 32
Joined: Tue Jan 22, 2008 10:25 am

Getting JavaScript in IE7

Post by jlim »

Have v2.2

When loading this page:

http://localhost/timetrex/interface/index.php

IE7 throws this error:

Line: 357
Char: 187
Error: Expected hexadecimal digit
Code: 0
URL: http://localhost/timetrex/interface/index.php

************************************************

When loading this page:
http://localhost/timetrex/interface/tim ... eSheet.php

IE7 throws this error:

Line: 1198
Char: 187
Error: Expected hexadecimal digit
Code: 0
URL: http://localhost/timetrex/interface/tie ... eSheet.php


Thanks.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Can you login to our online demo and see if the same javascript errors occur there?

I'm not seeing those errors on our end here.

Can you tell us more specifically what version of TimeTrex you are running? It should be 3 digits. ie: v2.2.0.
t2n421

Post by t2n421 »

sorry, where is the online demo?
jlim
Posts: 32
Joined: Tue Jan 22, 2008 10:25 am

Post by jlim »

Sorry ... I'm running v.2.2.2

I'm running IE ver 7.0.5730.13 on XP Pro SP2.

I ran the demo on your site and there's no error with this link.

http://demo.timetrex.com/interface/html5/
How should I proceed?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Can you try a different browser, like Mozilla FireFox to see if the same or similar error occurs with it?

Is it possible for you to email support@timetrex.com a link and login/password to your TimeTrex installation so we can see the issue for ourselves?
t2n421

Post by t2n421 »

what is the username & password for the online demo? thx before
jlim
Posts: 32
Joined: Tue Jan 22, 2008 10:25 am

Post by jlim »

Shaunw - no error in FF 2.0.0.11. Only in the version of IE I mentioned.

The TimeTrex installation is running on behind our firewall. So, I can't send you the link.

I'll do more testing on different machines, browsers (ie6 maybe) and report back.

Thanks.
titania
Posts: 13
Joined: Tue Jan 29, 2008 7:33 pm

Post by titania »

@t2n421:
username=demoadmin1
password=demo
you can try the demo directly to
http://demo.timetrex.com/interface/Logi ... sword=demo
jlim
Posts: 32
Joined: Tue Jan 22, 2008 10:25 am

Post by jlim »

shauwn - I traced the error to this:

// in the timetrex\templates\footer.tpl, on line 31, if I removed the following, there's no error:

{if $config_vars.debug.production == 1 AND $config_vars.other.disable_google_analytics != 1}<script src="http{if $smarty.server.HTTPS == TRUE}s://ssl{else}://www{/if}.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct="UA-333702-3"; __utmSetVar('Company: {if is_object($current_company)}{$current_company->getName()}{else}N/A{/if}'); __utmSetVar('Edition: {if getTTProductEdition() == 20}Professional{elseif getTTProductEdition() == 15}Business{else}Standard{/if}'); __utmSetVar('Key: {if isset($system_settings)}{$system_settings.registration_key}{else}N/A{/if}'); __utmSetVar('Host: {$smarty.server.HTTP_HOST}'); __utmSetVar('Version: {$APPLICATION_VERSION}'); urchinTracker();</script><img src="{$IMAGES_URL}spacer.gif">{/if}


If I run http://localhost/timetrex/interface/tim ... eSheet.php on IE7, it shows:

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct="UA-333702-3"; __utmSetVar('Company: Altair Engineering, Inc.'); __utmSetVar('Edition: Standard'); __utmSetVar('Key: SoapFault exception: [HTTP] Could not connect to host in C:\xampp\htdocs\timetrex\classes\modules\soap\TimeTrexSoapClient.class.php:139
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://www.time...', 'urn:test'); __utmSetVar('Host: localhost'); __utmSetVar('Version: 2.2.2'); urchinTracker();</script><img src="/timetrex/interface/images/spacer.gif">


I'm using XAMPP and initially I had installed it under c:\xampp\htdocs\timetrex.

However, at a later point, I had 2 versions of xampp, so I renamed the directory to c:\xampp1.5.5 and that's where I'm running timetrex.

It looks like it is still referring to c:\xampp instead of c:\xampp1.5.5.

Funny thing firefox is also showing (for the same page c:\xampp) but it doesn't throw the JS error.

Should be an easy fix, right? Thanks.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

It appears like there are several issues causing problems. Having two installations of XAMPP conflicting with each can definitely cause issues.

Another problem appears to be that SOAP error, but the strange thing is I don't think SOAP should be called at all, so that is a little confusing. I'm almost wondering if that error message somehow got saved into your database?

Can you try running this SQL query for your SQL console:

select * from system_setting where name = 'registration_key';

What is the output of that?
jlim
Posts: 32
Joined: Tue Jan 22, 2008 10:25 am

Post by jlim »

This is the output. Actually, there's no c:\xampp directory anymore. It is now c:\xampp1.5.5 and c:\xampp1.6.5

Short of re-installing Timetrex, I should be able to change the parameter somewhere, right?


id name value
8 registration_key SoapFault exception: [HTTP] Could not connect to host in C:\xampp\htdocs\timetrex\classes\modules\soap\TimeTrexSoapClient.class.php:139
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://www.time...', 'urn:test
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Just as I expected, try this:

update system_setting set value='' where name = 'registration_key';

For some reason that error message got saved to your database, which it really shouldn't have been. The above command will clear it out and hopefully fix the issue.
jlim
Posts: 32
Joined: Tue Jan 22, 2008 10:25 am

Post by jlim »

That fixed it. No more IE JS errors.
Locked