Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Owdy on March 19, 2008, 03:40:18 AM

Title: [2.0 beta3p] editing languages error
Post by: Owdy on March 19, 2008, 03:40:18 AM
If i hit Finnish, i get this:

QuoteFatal error: require() [function.require]: Failed opening required '/var/www/fs1/0/public_html/foorumi/Themes/default/languages/index.finnish.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/fs1/0//public_html/foorumi/Sources/ManageServer.php on line 1193

It tryes to open index.finnish.php, should try index.finnish-utf8.php.
Title: Re: [2.0 beta3p] editing languages error
Post by: karlbenson on March 19, 2008, 08:14:24 AM
Sorry Owdy. I had to congratulate you on your 12,000th post
Title: Re: [2.0 beta3p] editing languages error
Post by: SleePy on March 19, 2008, 11:22:12 AM
Are you using finnish or finnish-utf8?
Are you using caching?
Title: Re: [2.0 beta3p] editing languages error
Post by: Owdy on March 19, 2008, 01:54:06 PM
finnish-utf8 . Caching or not, same error. English works. Like i sayd, error message says it tryes to find index.finnish.php, but it should try to find UTF version.
Title: Re: [2.0 beta3p] editing languages error
Post by: SleePy on March 19, 2008, 03:18:55 PM
Open ManageServer.php
Find:
    // Clean the ID - just in case.
    preg_match('~([A-Za-z0-9_]+)~', $context['lang_id'], $matches);

Replace:
    // Clean the ID - just in case.
    preg_match('~([A-Za-z0-9_-]+)~', $context['lang_id'], $matches);

Does that solve it?

I think the devs missed a character when cleaning the input id.
Title: Re: [2.0 beta3p] editing languages error
Post by: Owdy on March 19, 2008, 04:07:15 PM
Yes, fixed.
Title: Re: [2.0 beta3p] editing languages error
Post by: SleePy on March 19, 2008, 09:23:16 PM
Ok, For Team reference this bug is http://dev.simplemachines.org/mantis/view.php?id=1791