This topic was marked solved by Pandos, on June 2nd, 2014, 08:56 AM
Install error get_preferred_language()
[switch languages] Weird error »

CerealGuy

  • Posts: 343
Install error get_preferred_language()
« on May 30th, 2014, 06:16 PM »Last edited on May 31st, 2014, 12:21 AM
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

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Install error get_preferred_language()
« Reply #1, 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..?

CerealGuy

  • Posts: 343
Re: Install error get_preferred_language()
« Reply #2, 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:

Gerriet

  • Posts: 18
Install issues - Call to undefined function info inside
« Reply #3, 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
Re: Install error get_preferred_language()
« Reply #4, on May 31st, 2014, 11:19 AM »Last edited on May 31st, 2014, 11:42 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

CerealGuy

  • Posts: 343
Re: Install error get_preferred_language()
« Reply #5, 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.

Gerriet

  • Posts: 18

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Install error get_preferred_language()
« Reply #7, 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...

Pandos

  • Living on the edge of Wedge
  • Posts: 635
# dpkg-reconfigure brain
error: brain is not installed or configured

Nao

  • Dadman with a boy
  • Posts: 16,079

Pandos

  • Living on the edge of Wedge
  • Posts: 635
Re: Install error get_preferred_language()
« Reply #10, on June 2nd, 2014, 09:22 AM »Last edited on June 2nd, 2014, 09:30 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).

CerealGuy

  • Posts: 343
Re: Install error get_preferred_language()
« Reply #11, 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.

Pandos

  • Living on the edge of Wedge
  • Posts: 635
Re: Install error get_preferred_language()
« Reply #12, 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?
Re: Install error get_preferred_language()
« Reply #13, 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. :)

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Install error get_preferred_language()
« Reply #14, 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 ;)

[switch languages] Weird error »