Storage path not writable and other problems

Ask your questions regarding TimeTrex installation here.
Locked
aviast
Posts: 6
Joined: Wed May 09, 2007 6:48 pm

Storage path not writable and other problems

Post by aviast »

Hello,

I'm installing TimeTrex on CentOS5 with SELinux enabled and I just spent a while trying to figure out why the storage directory was not writable. It turns out I needed to execute this command:

Code: Select all

chcon -t httpd_sys_content_t storage
to get it to work.

I then proceeded to the next step, entering my location details, and received this error:
City contains invalid characters.
for the value
Nuku'alofa
This is a perfectly valid city name so I think the code should be amended to allow this.

Regards,

Michael
aviast
Posts: 6
Joined: Wed May 09, 2007 6:48 pm

...another problem

Post by aviast »

Sorry, I know it's not good form to reply to your own post but I have been having trouble entering a business phone number. I've looked at the code for Validator::isPhoneNumber() and the logic is just wrong:

Code: Select all

if ( strlen($phone) >= 10 AND strlen($phone) <= 15
    AND preg_match('/^[0-9\(\)\-\.\+\ ]{10,20}$/i',$value) ) {
    return TRUE;
}
Since when does a phone number have to be between 10 and 15 digits??? I think the developers are trying to be too clever here.
aviast
Posts: 6
Joined: Wed May 09, 2007 6:48 pm

...another problem

Post by aviast »

Sorry (again). I know I sound like a whinger, but that's just because I want to make this software better! :wink:

By entering bogus values I have been able to bypass the validator and complete the installation. Now when I log in I have to complete the details for the first user. The first problem I had was that the form insisted on a postal code. These don't exist in Tonga so I had to enter another bogus value to get past that.

Now I need to load up all the employees. I'll let you know how I go...
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Please post examples of what you are trying to enter, such as the telephone number so we can adjust the validation code to match.
aviast
Posts: 6
Joined: Wed May 09, 2007 6:48 pm

Phone number

Post by aviast »

Hi Shaun,

At first I tried to enter "+676-23668". Personally I don't think there's a need to be too strict when validating phone numbers; it's better to be flexible and not risk returning "false negatives".

I'm just doing the data entry at the moment. Boy, it would be nice if there was a "bulk upload" facility!
aviast
Posts: 6
Joined: Wed May 09, 2007 6:48 pm

Re: Phone number

Post by aviast »

aviast wrote: I'm just doing the data entry at the moment. Boy, it would be nice if there was a "bulk upload" facility!
Actually, scratch that comment. It would be nice if TimeTrex integrated with LDAP! (which may be ActiveDirectory)
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Check the import directory, it contains scripts to help import users and punches.
aviast
Posts: 6
Joined: Wed May 09, 2007 6:48 pm

Post by aviast »

shaunw wrote:Check the import directory, it contains scripts to help import users and punches.
Doh! I've finished the data-entry; there were only 40 users so it wasn't too bad.

I'm just entering holidays and I've received an error:
Incorrect Input!

1. Name is invalid.
For the value:
Official Birthday of His Majesty, King George Tupou V.
I am loving TimeTrex but the validation is the one thing that I'm finding annoying.

Something I meant to mention before with the phone number validation: the error messages don't give any information as to what is wrong with the input. For the phone numbers I had to read the source code to find out why I wasn't passing validation, and now I'll have to do that for the holiday name too. The error messages should say something like:
Phone number invalid.
The number must be of the format: (123) 456-7890
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Commas (",") and Periods (".") often aren't allowed in naming fields because they can cause issues when searching later on.
Locked