Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: CerealGuy on May 30th, 2014, 06:16 PM

Title: Install error get_preferred_language()
Post by: CerealGuy on May 30th, 2014, 06:16 PM
Its connected to dfa1bdffa35693773fb1199fc108d1046336375c.
Problem is that get_preferred_language got moved to we::.
Installation fails because of this.

EDIT:
In Class-System.php change
Code: [Select]
private static function get_preferred_language($language)

to

Code: [Select]
public static function get_preferred_language($language)

and in install.php

Code: [Select]
$lang = get_preferred_language();

to

Code: [Select]
$lang = we::get_preferred_language();

https://github.com/C3realGuy/wedge/commit/7b1146e5f18fa06fb2010b9e0ff482c5bc29f5a8
Title: Re: Install error get_preferred_language()
Post by: Nao on May 31st, 2014, 12:59 AM
Ouch, forgot to check non-core files...

I think your fix has a limitation, in that it will always return English...
Can you test by replacing the line with this..?

Code: [Select]
$settings['language'] = 'english';
$settings['userLanguage'] = 1;
$lang = we::get_preferred_language();

Does it return your browser's preferred language pack, now..?
Title: Re: Install error get_preferred_language()
Post by: CerealGuy on May 31st, 2014, 01:21 AM
Quote from Nao on May 31st, 2014, 12:59 AM
Ouch, forgot to check non-core files...

I think your fix has a limitation, in that it will always return English...
Can you test by replacing the line with this..?

Code: [Select]
$settings['language'] = 'english';
$settings['userLanguage'] = 1;
$lang = we::get_preferred_language();

Does it return your browser's preferred language pack, now..?
You're right, but it still returns english :hmm:.
Perhaps im too tired to understand whats wrong ^^ Will have a look on it later :lol:
Title: Install issues - Call to undefined function info inside
Post by: Gerriet on May 31st, 2014, 11:01 AM
Good morning ;D

I have a bug found or not .. I not know .. lol .. But I can“t install Wedge, this message comes

Code: [Select]
Fatal error: Call to undefined function get_preferred_language() in hosting/webseiten/fractalforums.de/install/install.php on line 264

PHP Version: 5.4.16 (save settings)

I hope this enough infos ;D
Title: Re: Install error get_preferred_language()
Post by: Gerriet on May 31st, 2014, 11:19 AM
Hi ;D

I have the same problem, but I not know where I must set the bugfix ...  So I must wait ...

Edit:
OK, I have  a  another wedge git version from 29.05 .. no install issues
Title: Re: Install error get_preferred_language()
Post by: CerealGuy on May 31st, 2014, 12:21 PM
Quote from Gerriet on May 31st, 2014, 11:19 AM
Hi ;D

I have the same problem, but I not know where I must set the bugfix ...  So I must wait ...

Edit:
OK, I have  a  another wedge git version from 29.05 .. no install issues
You can use an older version and then upgrade to the latest one (the bug only matters on installation) or you can use
this version https://github.com/C3realGuy/wedge/. Its the latest commit + some bug fixes.
But i suggest to stay on the original releases.
Title: Re: Install error get_preferred_language()
Post by: Gerriet on May 31st, 2014, 02:19 PM
Thanks, but I have now install a forum .. hurray ;D

And convert from a mybb 1.6.13 over SMF 2.07 .. lol
Title: Re: Install error get_preferred_language()
Post by: Nao on June 2nd, 2014, 12:03 AM
Quote from Gerriet on May 31st, 2014, 11:19 AM
Edit:
OK, I have  a  another wedge git version from 29.05 .. no install issues
Yes, that's the idea... Downgrading to a version from a few days earlier would work.

@Everyone, guys, can anyone take a few minutes to test the installer fix..?
I myself have been too busy reworking Weaving. And reworking all other skins in the process, since changing Weaving breaks them all a bit, ah ah...
Title: Re: Install error get_preferred_language()
Post by: Pandos on June 2nd, 2014, 08:56 AM
Confirmed as fixed!
Title: Re: Install error get_preferred_language()
Post by: Nao on June 2nd, 2014, 08:59 AM
Gave you German...? :)
Title: Re: Install error get_preferred_language()
Post by: Pandos on June 2nd, 2014, 09:22 AM
Not the installer. Only Wedge itself.
If you upload languages before installing your forum, they will be displayed and you have to choose.
Installing in your prefered language will make this language default in your forum. Go to admin and enable all languages as available.
Change your main language to e.g. English and Browse as guest. Et voila! Wedge is in your prefered language (e.g. German).
Title: Re: Install error get_preferred_language()
Post by: CerealGuy on June 2nd, 2014, 11:08 AM
Quote from Pandos on June 2nd, 2014, 09:22 AM
Not the installer. Only Wedge itself.
If you upload languages before installing your forum, they will be displayed and you have to choose.
Installing in your prefered language will make this language default in your forum. Go to admin and enable all languages as available.
Change your main language to e.g. English and Browse as guest. Et voila! Wedge is in your prefered language (e.g. German).
Yes that one is fixed, but normally on installation it should give you the browser language. But in the moment it only gives you english and you have to choose for example german on your own.

EDIT: Checked with the latest commit, bug is still present.
Title: Re: Install error get_preferred_language()
Post by: Pandos on June 2nd, 2014, 11:24 AM
Quote from CerealGuy on June 2nd, 2014, 11:08 AM
EDIT: Checked with the latest commit, bug is still present.
How to reproduce?
Quote
Yes that one is fixed, but normally on installation it should give you the browser language. But in the moment it only gives you english and you have to choose for example german on your own.
For me it's OK when you have to choose from available languages.

Did we talk about two different things?
Title: Re: Install error get_preferred_language()
Post by: Pandos on June 2nd, 2014, 02:11 PM
OK, think this is easy to misunderstood. :)

1. Install eror is fixed
2. Prefered language in Wedge itself works
3. Prefered language on installer doesn't work. :)
Title: Re: Install error get_preferred_language()
Post by: Nao on June 3rd, 2014, 01:03 AM
Should be 100% fixed now, tested locally and fixed it (a last-minute change, as often with me... Please forbid me from doing last-minute changes in the future just for the sake of commititng cooler-looking code......)

PS: please refrain from marking a topic as fixed if it isn't 100% done, it could get confusing ;)
Title: Re: Install error get_preferred_language()
Post by: CerealGuy on June 3rd, 2014, 01:50 PM
I can confirm, now its really really fixed :eheh:
Thanks Nao :)