Attachments
language_info.php
Language Information Locator
Votes
For: 0 (0%)
Against: 0 (0%)
Total: 0
July 28, 2007 11:58 AM
Soma
Hi,
I upgraded 1.2.0RC to 1.2.1
When I submit a bug report or a comment, I receive the following error messag, altough my entry enters into the database:
Error: Fatal
Could not load the template '/templates/../locale//emails/notice_comment.part.tpl' in /framework/template_fs.php on line 207
I use PHP 5.2.3 and MySQL
Any help would be appreciated.
Best,
Soma
I upgraded 1.2.0RC to 1.2.1
When I submit a bug report or a comment, I receive the following error messag, altough my entry enters into the database:
Error: Fatal
Could not load the template '/templates/../locale//emails/notice_comment.part.tpl' in /framework/template_fs.php on line 207
I use PHP 5.2.3 and MySQL
Any help would be appreciated.
Best,
Soma
July 28, 2007 04:03 PM
Robert
Are you using a language other than English? A few things to do:
1) Go to Administration -> Options -> Languages and edit the primary language for your system. Make sure that the "Gettext Language Code" is set correctly. Even if you haven't made any changes, press "Save" just to update the database.
2) Go to Administration-> Options -> Bugdar Seetings. Make sure that you have a "Default Language" selected and again press "Save" just to be sure the database stores it.
3) Go to the place where Bugdar's files are stored, and navigate to locale/<the Gettext Language Code for your default language>/emails/ and make sure that this has the the file named notice_comment.part.tpl. If it is not there, duplicate it from locale/en_US/emails/
1) Go to Administration -> Options -> Languages and edit the primary language for your system. Make sure that the "Gettext Language Code" is set correctly. Even if you haven't made any changes, press "Save" just to update the database.
2) Go to Administration-> Options -> Bugdar Seetings. Make sure that you have a "Default Language" selected and again press "Save" just to be sure the database stores it.
3) Go to the place where Bugdar's files are stored, and navigate to locale/<the Gettext Language Code for your default language>/emails/ and make sure that this has the the file named notice_comment.part.tpl. If it is not there, duplicate it from locale/en_US/emails/
July 29, 2007 07:09 PM
Soma
Hi Robert,
Yes, I use a different language and I set it appropriately. I also doublechecked the existence of all files.
Afais, the error message says that the langage code is not put into the path. What do you think?
Best,
Soma
Yes, I use a different language and I set it appropriately. I also doublechecked the existence of all files.
Afais, the error message says that the langage code is not put into the path. What do you think?
Best,
Soma
July 30, 2007 10:18 PM
Robert
Yes the language code is definitely not being added to the path, but I do not understand why. The code that does it is in include/class_notification.php and the function is called _localeFromuserId(). It first checks to see if a user has a language set, if he/she does not, then it gets the default language.
Can you upload the language_info.php file I attached to your Bugdar root and then run it in your web browser? Save the results (File -> Save from the browser... HTML is fine) and post them here (there is nothing that could reveal your tracker information in the results so it'd be fine to post it publicly)? It will simply show a list of all the languages installed on your system as well as the default language ID.
Can you upload the language_info.php file I attached to your Bugdar root and then run it in your web browser? Save the results (File -> Save from the browser... HTML is fine) and post them here (there is nothing that could reveal your tracker information in the results so it'd be fine to post it publicly)? It will simply show a list of all the languages installed on your system as well as the default language ID.
August 9, 2007 08:00 AM
Soma
Hi Robert,
sorry for the late reply, I was on holiday ;)
I uploaded. My other language is Hungarian (Magyar).
best,
Soma
sorry for the late reply, I was on holiday ;)
I uploaded. My other language is Hungarian (Magyar).
best,
Soma
August 9, 2007 04:57 PM
Robert
That's downright peculiar and not what I expected. Try this, then. Open up includes/class_notification.php, scroll to the bottom, and find the function called _localeFromUserId(). Replace it with:
function _localeFromUserId($userid)
{
$langcode = $this->registry->datastore['language'][$this->users[$userid]['languageid']]['langcode'];
if (!$langcode)
{
$langcode = $this->registry->datastore['language'][$this->registry->options['defaultlanguage']]['langcode'];
}
return $langcode;
}
function _localeFromUserId($userid)
{
$langcode = $this->registry->datastore['language'][$this->users[$userid]['languageid']]['langcode'];
if (!$langcode)
{
$langcode = $this->registry->datastore['language'][$this->registry->options['defaultlanguage']]['langcode'];
}
return $langcode;
}
August 9, 2007 06:34 PM
Soma
Hi Robert,
a million thanks! - works like charm - ticket can be resolved :)
Best,
Soma
a million thanks! - works like charm - ticket can be resolved :)
Best,
Soma
August 9, 2007 07:06 PM
Robert
Glad this got fixed. What was happening was that you probably had a language that you then deleted. But some users probably opted to use this now-deleted language, which of course, didn't exist and therefore the language code couldn't be retrieved.
--------------- AUTOMATIC RESPONSE ---------------
Thank you for your bug report. This issue has been closed and fixed in Subversion. This change will be available in a future release, but you can download the change at any time from the Subversion server.
--------------- AUTOMATIC RESPONSE ---------------
Thank you for your bug report. This issue has been closed and fixed in Subversion. This change will be available in a future release, but you can download the change at any time from the Subversion server.
On August 9, 2007 07:06 PM, Robert changed:
- Status from "Unconfirmed" to "Closed"
- Resolution from "Open" to "Fixed"
- Fixed in Revision from "" to "trunk:1599/branch:1600"