user_pref_get_language()
Moderators: Developer, Contributor
user_pref_get_language()
Greetings
I've installed mantisbt-1.2.0rc1 to my webhost server for testing purpose.
After updating the PHP version from 4 to 5, I succesfully set up the database connection. Then I went to the login page and all I got is an error message:
Fatal error: Call to undefined function user_pref_get_language() in d:\www\....\core\relationship_api.php on line 79
PHP Fatal error: Call to undefined function user_pref_get_language() in d:\www\....\core\relationship_api.php on line
I'm not used to PHP , so I don't know if it's a basic PHP function. If not, within which file is this function defined?
Eric.
I've installed mantisbt-1.2.0rc1 to my webhost server for testing purpose.
After updating the PHP version from 4 to 5, I succesfully set up the database connection. Then I went to the login page and all I got is an error message:
Fatal error: Call to undefined function user_pref_get_language() in d:\www\....\core\relationship_api.php on line 79
PHP Fatal error: Call to undefined function user_pref_get_language() in d:\www\....\core\relationship_api.php on line
I'm not used to PHP , so I don't know if it's a basic PHP function. If not, within which file is this function defined?
Eric.
Re: user_pref_get_language()
I'm getting exactly the same error
Fatal error: Call to undefined function user_pref_get_language() in c:\Inetpub\wwwroot\mantis\core\relationship_api.php on line 79
This is on Windows running IIS 6 with the PHP extension.
Strangely, it works just fine on my test setup which is running on XAMPP.
HELP!!
Fatal error: Call to undefined function user_pref_get_language() in c:\Inetpub\wwwroot\mantis\core\relationship_api.php on line 79
This is on Windows running IIS 6 with the PHP extension.
Strangely, it works just fine on my test setup which is running on XAMPP.
HELP!!
Re: user_pref_get_language()
I get the same error with 1.20rc1 and rc2.
Re: user_pref_get_language()
I just tried upgrading my 1.1.7 version to 1.2.0rc2 and got this same error. I didn't seem to find this in other places from google, so hopefully it is just something that we are missing and not much of a problem.
Re: user_pref_get_language()
Maybe this is a problem of an old PHP version.
Changing all 'var's to 'public' in BugRelationData solved the problem for me (PHP 5.1.2).
Changing all 'var's to 'public' in BugRelationData solved the problem for me (PHP 5.1.2).
Re: user_pref_get_language()
Does this mean that you have the first mentioned problem (user_pref_get_language) reproducible with current 1.2.0 and are able to solve this by changing var to public?
If yes, please enter an issue for it in MantisBT's own tracker
If yes, please enter an issue for it in MantisBT's own tracker
Re: user_pref_get_language()
Correct, after updating from 1.1 to 1.2 I had the undefined function error.
After commenting out some code, I verified that the keyword 'var' caused this strange behaviour.
'var' seems to be deprecated in PHP5.
After commenting out some code, I verified that the keyword 'var' caused this strange behaviour.
'var' seems to be deprecated in PHP5.
Re: user_pref_get_language()
thanks for entering the issue
hint for others to track this
http://www.mantisbt.org/bugs/view.php?id=11584
hint for others to track this
http://www.mantisbt.org/bugs/view.php?id=11584
Re: user_pref_get_language()
Getting the same error defined in posts above..pskiwi wrote:Maybe this is a problem of an old PHP version.
Changing all 'var's to 'public' in BugRelationData solved the problem for me (PHP 5.1.2).
Can you describe, with more detail, how you resolved the issue? Where's "BugRelationData"? Is it a file or a section in a configuration file?
thanks much,
elo
Re: user_pref_get_language()
I'm receiving the same error detailed above in previous posts..pskiwi wrote:Maybe this is a problem of an old PHP version.
Changing all 'var's to 'public' in BugRelationData solved the problem for me (PHP 5.1.2).
Can you describe, in more detail, how you resolved the issue? (i.e. where's "BugRelationData"? is it a file, or a section in a config file?)
thanks much
elo
Re: user_pref_get_language()
Hi,
I also had this problem ...
if looking for quick solution:
1) change "core/relationship_api.php"
- change 'var' to 'public' in class 'BugRelationshipData'
2) find all lines with 'user_pref_get_language' - "core/lang_api.php"
and add second parameter value 'ALL_PROJECTS' if not exist
example:
found:
change to:
3) find all lines with 'user_pref_get_language' - "core/email_api.php"
and repeat second step
everything works without other problems
I also had this problem ...
if looking for quick solution:
1) change "core/relationship_api.php"
- change 'var' to 'public' in class 'BugRelationshipData'
2) find all lines with 'user_pref_get_language' - "core/lang_api.php"
and add second parameter value 'ALL_PROJECTS' if not exist
example:
found:
Code: Select all
$t_lang = user_pref_get_language( auth_get_current_user_id() );
Code: Select all
$t_lang = user_pref_get_language( auth_get_current_user_id(), ALL_PROJECTS );
and repeat second step
everything works without other problems
Re: user_pref_get_language()
Had the same problem after upgrading today. I used a new directory for the fresh install. Upgraded Mantis version 1.0.7 to 1.2.1 and got the following error after first launch:
[23-Jun-2010 20:03:17] PHP Fatal error: Call to undefined function user_pref_get_language() in c:\Inetpub\wwwroot\mantisbtNew\core\relationship_api.php on line 79
Found the fix here by just changing some private vars to public. Changed var to public in the BugRelationshipData class in file core/relationship_api.php
class BugRelationshipData {
var $id;
var $src_bug_id;
var $src_project_id;
var $dest_bug_id;
var $dest_project_id;
var $type;
}
TO:
class BugRelationshipData {
public $id;
public $src_bug_id;
public $src_project_id;
public $dest_bug_id;
public $dest_project_id;
public $type;
}
I did not perform step 2 as mentioned in the previous post. Mantis seems to be working fine now.
[23-Jun-2010 20:03:17] PHP Fatal error: Call to undefined function user_pref_get_language() in c:\Inetpub\wwwroot\mantisbtNew\core\relationship_api.php on line 79
Found the fix here by just changing some private vars to public. Changed var to public in the BugRelationshipData class in file core/relationship_api.php
class BugRelationshipData {
var $id;
var $src_bug_id;
var $src_project_id;
var $dest_bug_id;
var $dest_project_id;
var $type;
}
TO:
class BugRelationshipData {
public $id;
public $src_bug_id;
public $src_project_id;
public $dest_bug_id;
public $dest_project_id;
public $type;
}
I did not perform step 2 as mentioned in the previous post. Mantis seems to be working fine now.
Re: user_pref_get_language()
Hi, I have the same problem as described in previous posts:
I tried to do all described steps but still I've got the same error. I added ALL_PROJECTS as second parameter into function in lang_api.php file but it does't change anything.
I have mantis 1.2.8 version, PHP 5.2.9 version and mantis working on apache server. Any ideas what can be wrong?
Thanks in advance for your help.
Code: Select all
PHP Fatal error: Call to undefined function user_pref_get_language() in /home/mantis/mantisbt-1.2.8/core/lang_api.php on line 104, referer: https://mantis.s4a.aero/mantis/manage_plugin_page.php
I have mantis 1.2.8 version, PHP 5.2.9 version and mantis working on apache server. Any ideas what can be wrong?
Thanks in advance for your help.
Re: user_pref_get_language()
caro,
are you able to reproduce the issue on the same server with a fresh installation of latest stable version of MantisBT (1.2.15 at the moment)?
are you able to reproduce the issue on the same server with a fresh installation of latest stable version of MantisBT (1.2.15 at the moment)?
Re: user_pref_get_language()
I'm afraid not, cause this is company server and I cannot to release new mantis versions on it. But I forgot to admit that I have 2 other mantises on this server (the same bugtracker versions) and they work correctly! There was some changes in this mantis code but same as in these 2 other mantises. So, it's really strange error for me...