Page 2 of 3

Re: .lang.php file not found

PostPosted: Fri Oct 29, 2010 8:21 pm
by chris
Sorry, been out for the afternoon so I didn't get a chance to answer you ;)
Your solution is OK for viewing but you will have problems when you want to modify texts.
The code *needs* the LANG constant to be correctly defined for various things such as database modification and insertion.
So ideally we do need to know why this isn't working.

If you say that by hardcoding "en" into the path name works it means that the LANG constant is empty for some reason.
You also say that it is set to "en" in the database so it looks like the problem is with the SESSION variable that is defined when the user logs in to define in which language the admin should be shown.
This is selected from the login panel.
Is there any chance that you could check your admin panel to see which languages it offers and also to do an echo on the session variables that the page has. You can do this by simply adding:
Code: Select all

pretty much anywhere on the index.php page (eg after the session_start(); at the top of the page).
I would be happy to take a closer to take a look at this issue myself. If you want me to (I would be interested to know what is happening so that I can help others if they run into the same issue), just send me a pm with your ftp details. I promise not to break anything ;)


Re: .lang.php file not found

PostPosted: Thu Dec 09, 2010 3:30 pm
by globe
Did anyone ever get to the bottom of this issue, i had the same one however, I think I have solved it.

When I originally installed using Firefox, I made a mistake and misconfigured, even though I correct the misconfiguration I was still getting the .lang.php not found message as everyone else is experiencing.

I had not previously visited the page in Google Chrome and for some reason cut 'n' pasted the URL of my calendar into it...voila it displayed without issue, I also tried with IE8, again no issue.

In short, I realised it must be something to do with sessions, so I shut Firefox down, reopened it again and the calendar worked without issue - hope this helps.

Re: .lang.php file not found

PostPosted: Sun Feb 06, 2011 7:29 am
by lompnaz
Me too! Had this problem for 3 days - uninstalled/reinstalled, deleted databases left right & centre! Nothing would cure it, then tried using Google chrome and no problems! Thanks Mozilla, seems your browser is getting buggy.

Re: .lang.php file not found

PostPosted: Tue Feb 08, 2011 8:27 pm
by hugo
Hello Chris,

I do have, more or less, the same problem as being described here.
But my situation might give you some more details:

In this case I do get the message: C:\xampp\htdocs\calendar\ac-contents/lang/NL.lang.php not found.

When I, change $the_file=AC_DIR_LANG.LANG.".lang.php"; to $the_file=AC_DIR_LANG.LANG."NL.lang.php", I do get the error : C:\xampp\htdocs\calendar\ac-contents/lang/NLNL.lang.php not found.

When I create NL.lang.php instead I do get access to the admin page.
Selecting "Bookings" gives the error: Error checking items, Unknown column 'b.desc_NL' in 'field list'.
Sounds like a missing field desc_NL in table bookings_items and bookings_states. These (and other) table does not contain a field desc_NL but I would not expect it after a fresh installation. So I leave it as it is for this moment.

When I try to delete Language NL, I get the message "Item has NOT been deleted". This is the same for language en and es. This was also the case after the first time installation!

Last option to think about is to add field desc_NL in table bookings_items and bookings_states.
Bookings do show up now without an error.
Booking States do show up as well but all filled in states are "0". I can modify them and after that I do see the Dutch representation of the State (I would expect the Englisch).
It is still not possible to delete a language, so this is still an open question to you . But the bigest question is, how is it possible that at installation time a script or the DB knows about the NL.lang.php, I created before.

I really started from scratch. Directory empty, deleted the database, stopped the Apache server and MySql (I am using XAMP on a Windows computer). Downloaded Version 3.03.03 once again and so on. To be sure it has nothing to do with MySql, I used a different database name as well. But still something knows about the NL.lang.php I created before and deleted already.

Best regards,

Re: .lang.php file not found

PostPosted: Tue Feb 08, 2011 9:01 pm
by chris
Hi Hugo,
Thanks for all that info. There is a lot to take in there and to be honest I don't quite know what is going on :(

I have just done a fresh install (on a linux server, I don't have access to a windows server) and have been able to add a new language with absolutely no problem (language file created and language fields added to database).

Just to be sure - you are adding the new language via the admin panel and NOT just creating a new language file in the ftp aren't you? It is essential that new languages are added in this way as the code needs to update the database accordingly.
Assuming that you have done this I can only think that it must be a windows issue.

Is there any chance that I could get temporary access to your ftp to have a play with the code to see what is going on?

The only problem I did encounter was when I tried to delete it.
A quick look at the code showed me the reason:

In the ac-admin/languages.admin.php file you need to replace every instance of DIR_LANG with AC_DIR_LANG.
I need to fix that in the zipped version.



Re: .lang.php file not found

PostPosted: Wed Mar 23, 2011 12:07 am
by RJK
Unfortunately I'm suffering from the same issue here.

I've checked in the backend via phpMyAdmin and en is showing as the default language. I've tried selecting Spanish as the defauly language at installation stage, however, the same problem occurs.

As someone previously suggested, changing en.lang.php to simply .lang.php does make some difference, but only to the backend, the frontend still wasn't visible to me.

Did anyone ever find a solution to this?

Chris - I'm happy to let you have access to the backend to play around and see if you can find the problem here, and for others if you have the time. I'll pm you the relevant details anyhow.



Re: .lang.php file not found

PostPosted: Wed Mar 23, 2011 12:49 am
by RJK
Chris - I'm questioning (in fact thinking) that the issue lies not with the s/w but with the machine trying to access the web page.

I've successfully accessed both the front and backends of the calendar on two other machines. All machines are Windows, and one of the other two is running exactly the same build number of Firefox (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv: Gecko/20110303 Firefox/3.6.15 GTB7.1 ( .NET CLR 3.5.30729))

Do you have any idea on how this could be possible? I'll have a look through all the varios options and see if I can find any differences although I think they're both std. installs with nothing changed.


Re: .lang.php file not found

PostPosted: Wed Mar 23, 2011 1:27 am
by chris
I managed to work out your url from the pm that you sent me and I must say that I can't see any problems.
Both the front-end and admin appear to be working correctly and I am not getting any missing language file errors.
In most cases this error seems to disappear on it's own. I wonder what causes it?


Re: .lang.php file not found

PostPosted: Thu Mar 24, 2011 12:03 am
by RJK
Yes it is strange....and to prove the point this morning when I revisited things all was working fine. The V2 Calendar that I have running elsewhere still doesn't like Firefox but I'll upgrade that shortly.

I'm still playing around with V3 but must say I am mightily impressed. The change from V2 to V3 is enormous. And being CSS based it's just so flexible. Truly, I think you should be charging for this. When you look around out there I'm not aware of anything to touch it really unless you start paying reasonable sums. Even just $5 or so would I'm sure help the coffers. I'll donate something to the cause.


Re: .lang.php file not found

PostPosted: Mon Apr 04, 2011 8:23 am
by adelante
Could this be it? I have the same problem with only firefox however it only occurs when the url doesn't contain www. Add http://www to the url and it works fine every time.

I stumbled on this when I added a re-direct (header) on an email processing script, once the browser went to the thank_you.php page the www was lost (relative link) and the problem began. Simple solution is to ensure that all links to your calendar page are absolute and contain the www eg.

Can anyone else confirm this?

By the way thanks for the excellent script Chris.


Just tried it on my home laptop running firefox 3.6.16 with no problem with or without www in the url. The computer at work was running Firefox 4, maybe just a coincedence. :?: