Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Loswaith on March 22, 2011, 12:34:17 AM

Title: Default Language Error
Post by: Loswaith on March 22, 2011, 12:34:17 AM
    * Version(s) of SMF
          SMF 2.0 RC5
    * Your Setup:
          o List any Modifications you have installed
                None
          o List any Themes you have installed
                Self CSS Edited Curve Default (copy)
          o List any non-English Language packs you have installed
                English British (ISO-8859-1 and UTF-8)
          o Are you using UTF-8?
                Sometimes
         
    * Where the Error Occurred
          o File: /Themes/default/languages/Modifications.english.php
          o Line: 171
          o Any relevant errors in the SMF error log (if so please post them)?:
                Hundreds of errors all pointing to this one thing from various pages           
    * How to Reproduce this Error?:
          Set Default langage to either types of british language, they will start showing up in various locations
    * Additional Information?
          Setting the default language back to English (default installed language) stops the error occuring
Title: Re: Default Language Error
Post by: Arantor on March 22, 2011, 04:26:04 AM
You haven't actually said what the error *is*, or why it's an error...
Title: Re: Default Language Error
Post by: Illori on March 22, 2011, 05:41:42 AM
sounds like the op installed a mod, that does not support their language and that is the issue that is causing errors to appear in the log.
Title: Re: Default Language Error
Post by: Arantor on March 22, 2011, 05:49:04 AM
Well, it says no mods installed, but that's why I want to see the error message(s) because I have a feeling it's nothing to do with the language files at all.
Title: Re: Default Language Error
Post by: Jokerâ„¢ on March 22, 2011, 06:47:33 AM
Quote from: Loswaith on March 22, 2011, 12:34:17 AM
    * Where the Error Occurred
          o File: /Themes/default/languages/Modifications.english.php
          o Line: 171
          o Any relevant errors in the SMF error log (if so please post them)?:
                Hundreds of errors all pointing to this one thing from various pages           
Isn't that file empty when you install a fresh forum, i.e that file doesn't have any text strings.
Title: Re: Default Language Error
Post by: Arantor on March 22, 2011, 09:20:25 AM
It certainly doesn't have 171 lines in it... which is why I don't think it's in there.
Title: Re: Default Language Error
Post by: Loswaith on March 24, 2011, 06:48:41 AM
Quote from: Loswaith on March 22, 2011, 12:34:17 AM
    * Where the Error Occurred
          o File: /Themes/default/languages/Modifications.english.php
          o Line: 171
          o Any relevant errors in the SMF error log (if so please post them)?:
                Hundreds of errors all pointing to this one thing from various pages           
    * How to Reproduce this Error?:
          Set Default langage to either types of british language, they will start showing up in various locations
    * Additional Information?
          Setting the default language back to English (default installed language) stops the error occuring

This explains the error, obviously I didn't see a point repeating information in telling what the error is when its the error message telling me the error, and I've mentioned how to reproduce it.  When the logs constantly fill up with this error it makes it hard to find any others. Hence listing it as a bug rather than for support.

The file exists its just empty, I presume the error is being thrown up by whatever checks or is looking for that file and line.
Title: Re: Default Language Error
Post by: Arantor on March 24, 2011, 06:51:56 AM
No, you haven't told us what the error actually *is*. You've said where it is and what file it's in, which is in a file that by default has about 10 lines in it. Modifications.anything.php is almost empty on a fresh installation.
Title: Re: Default Language Error
Post by: Loswaith on March 24, 2011, 06:57:53 AM
Its in the error log, where else is an error going to show up and give that information?

Sorry for assuming an error shows up in an error log, my mistake for assuming what I thought would be obvious.
Title: Re: Default Language Error
Post by: Arantor on March 24, 2011, 06:58:30 AM
I don't have access to your error log now, do I? If you could kindly tell me what the actual error is, maybe someone here can help you. Right now, I don't have enough information to debug anything.
Title: Re: Default Language Error
Post by: Loswaith on March 24, 2011, 07:12:49 AM
Its an error constantly showing up in the error log, thats it.
Other than whats previously listed  it gives "8: Undefined offset: 28" and a link back to the error log, it says nothing else.

The type of error is listed as undefined
Title: Re: Default Language Error
Post by: Arantor on March 24, 2011, 07:20:27 AM
Ah, see NOW I can identify the problem.

It is a bug in the English language pack, but without knowing what the actual error was I could have gone through hundreds of files trying to find the problem - with that error, I was able to narrow it down in a matter of moments :)

The offending line is line 171 of Themes/default/languages/index.english_british.php (or index.english_british-utf8.php, they should be built at the same time from the language tools on this site)

$txt['welcome_guest'] = 'Welcome, <b>' . $txt[28] . '</b>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';

There's your undefined offset 28. I'm guessing it should in theory be:

$txt['welcome_guest'] = 'Welcome, <b>' . $txt['guest_title'] . '</b>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';

Having now identified the issue, I can raise it with the proper people in order to get it fixed.
Title: Re: Default Language Error
Post by: agridoc on March 24, 2011, 01:27:45 PM
The original in index.engish.php for SMF 2.0 is
$txt['welcome_guest'] = 'Welcome, <strong>%1$s</strong>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
Same parameters also in Greek 2.0 translation.

This line was left as in 1.1x in index.english_british.php for 2.0. A more thorough check might reveal more errors or not.
Title: Re: Default Language Error
Post by: Relyana on March 24, 2011, 03:20:37 PM
Corrected! Thanks for reporting the issue Loswaith!  :)

Also many thanks for your constant outstanding support Arantor and agridoc!
Title: Re: Default Language Error
Post by: Loswaith on March 24, 2011, 09:51:14 PM
Quote from: Arantor on March 24, 2011, 07:20:27 AM
Ah, see NOW I can identify the problem.
...

Eh? I dont realy see what I added that was of any value
I am presuming its the nonsensical "8: Undefined offset: 28".

If it is the case an example of the information shown where the format for posting bugs is or the logs actually definining that line as the eror code even with a simple "Error:" before it in the logs would have made it abundantly clear that information was of any importance to users that otherwise would have no clue. (no offence meant just a sugestion)
Title: Re: Default Language Error
Post by: Arantor on March 25, 2011, 04:29:08 AM
QuoteEh? I dont realy see what I added that was of any value

You told me it was an undefined offset 28. That meant I had a very specific thing to search for in the language files, which meant I could search the entire set of SMF files for '28' which is something I knew wouldn't be very common.

The reason the word 'error' isn't put in front of every entry is because the entire log is solely comprised of errors, so it seems somewhat superfluous.
Title: Re: Default Language Error
Post by: Loswaith on March 27, 2011, 02:09:01 AM
Its more the case the error on logs could be mistaken for what is given at the top right corner of most error messages as it states "Error: " then lists the error clasification, in my case it was undefined.

The line being "8: undefined offset 28" is completly nonsensical (to anyone not familure with the layout of things, which is likely most initial users), I figured it was something to do with the way the log was recording it rather than any actual error information, given the 'Error: undefined' statement at the top right of the error message.  Hence the confusion about listing the error itself.

While having it listed after a simple "Error:" clause it may be superfluous for somone that deals with it on a regular basis but it also makes it explicit what the information is and makes the information make far more sence to those not intimatly familure with it.
  Simply a sugestion for clarity more than any real need, now that I am aware that information is the details of the error.
Title: Re: Default Language Error
Post by: Illori on November 18, 2011, 08:41:26 AM
is this issue resolved now? i have not seen any users post about anything that may be related.