Support Toolkit

Support toolkit 1.0.6 language problem - Support Toolkit

Support toolkit 1.0.6 language problem

by Theriddler1 » Tue Oct 30, 2012 11:19 am

When someone has two different language for in my example i have dutch and english.
when installing the new 1.0.6 STK i get the following:

Code: Select all

General Error
Language file ./language/en/nl/common.php couldn't be opened.

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: stk_msg_handler()

FILE: [ROOT]/includes/session.php
LINE: 2100
CALL: trigger_error()

FILE: [ROOT]/includes/session.php
LINE: 2059
CALL: user->set_lang()

FILE: [ROOT]/stk/includes/functions.php
LINE: 350
CALL: user->add_lang()

FILE: [ROOT]/stk/index.php
LINE: 32
CALL: stk_add_lang()


To fix this open stk/includes/functions.php

Find:

Code: Select all

    // Which phpBB version is the user using
       if (is_null($is_302))
       {
          // Guess the version based upon behavior, at this point a version
          // check isn't sufficient as there are cases where the version
          // information isn't available or isn't reliable.
          /*
           * // There are different ways of handling language paths due to the changes
           * // made in phpBB 3.0.3 (set custom lang path)
           * if (version_compare(PHPBB_VERSION_NUMBER, '3.0.2', '<='))
           * {
           *   $is_302 = true;
           * }
           * else
           * {
           *   $is_302 = false;
           * }
           */
          $is_302 = (file_exists($user->lang_path . 'common.' . PHP_EXT)) ? true : false;
       }


Replace with:

Code: Select all

    // Which phpBB version is the user using
       if (is_null($is_302))
       {
          // There are different ways of handling language paths due to the changes
          // made in phpBB 3.0.3 (set custom lang path)
          if (version_compare($config['version'], '3.0.2', '<='))
          {
             $is_302 = true;
          }
          else
          {
             $is_302 = false;
          }
       }


Is this a bug within the new version or had it got something to do on my side ?
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
User avatar
Theriddler1
Registered User
Posts: 449
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶
Contact:

Re: Support toolkit 1.0.6 language problem

by Erik Frèrejean » Fri Nov 02, 2012 11:34 am

I'm unable to reproduce this on a clean 3.0.11/1.0.6 installation. Which phpBB version are you using?
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: Support toolkit 1.0.6 language problem

by Theriddler1 » Fri Nov 02, 2012 1:16 pm

Erik Frèrejean wrote:I'm unable to reproduce this on a clean 3.0.11/1.0.6 installation. Which phpBB version are you using?


i'm using phpbb 3.0.11 version ,strange you can't reproduce this, it only occurs when installed two language, when you have only one language installed all is fine.

When i comparred both files stk/includes/functions.php from both versions (1.0.5 and 1.0.6) with the examdiff programm i noticed the differents of the old version done with the new version, when i reverted back the changes done in the new version (the one in above post) to the old way all is working fine.
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
User avatar
Theriddler1
Registered User
Posts: 449
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶
Contact:

Re: Support toolkit 1.0.6 language problem

by Erik Frèrejean » Fri Nov 02, 2012 5:50 pm

Which Dutch translation are you using? As we don't provide one at the moment.

That the old way is working isn't strange, this has been changed to work around some bugs that arise under some very specific circumstances.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: Support toolkit 1.0.6 language problem

by Theriddler1 » Sun Nov 04, 2012 5:10 pm

Erik Frèrejean wrote:Which Dutch translation are you using? As we don't provide one at the moment.


I'm using the standard mod package of stk version 1.0.6 without the Dutch translation for the mod, i'm only using the english language pack that's allready included in the package.
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
User avatar
Theriddler1
Registered User
Posts: 449
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶
Contact:

Re: Support toolkit 1.0.6 language problem

by Theriddler1 » Sun Nov 04, 2012 5:12 pm

Erik Frèrejean wrote:Which Dutch translation are you using? As we don't provide one at the moment.

That the old way is working isn't strange, this has been changed to work around some bugs that arise under some very specific circumstances.
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
User avatar
Theriddler1
Registered User
Posts: 449
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶
Contact:

Re: Support toolkit 1.0.6 language problem

by Theriddler1 » Sun Nov 04, 2012 6:50 pm

Erik Frèrejean wrote:Which Dutch translation are you using? As we don't provide one at the moment.

That the old way is working isn't strange, this has been changed to work around some bugs that arise under some very specific circumstances.
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
User avatar
Theriddler1
Registered User
Posts: 449
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶
Contact:

Re: Support toolkit 1.0.6 language problem

by Erik Frèrejean » Mon Nov 05, 2012 10:55 am

I'm using the same setup and still fail to reproduce this issue. Can you please fill out the SRT to give me better understanding of your setup.
Also, can you please revert that code block to the original state and add the following snipped on the line after $is_302 = (file_exists, re-run the STK and post back the output.

Code: Select all

echo'<pre>';var_dump($lang_data$lang_dirs$user->lang_path$is_302);exit; 
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: Support toolkit 1.0.6 language problem

by Theriddler1 » Tue Nov 06, 2012 1:10 pm

Support Request Template
What version of phpBB are you using? phpBB 3.0.11
What is your board's URL? http://www.peppersrus-forum.nl
Who do you host your board with? No answer given
How did you install your board? I used a download package provided by another website
What is the most recent action performed on your board? Please select your answer
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? Yes
What MODs do you have installed? too many
What styles do you currently have installed? Prosilver
What language(s) is your board currently using? Dutch [NL]
Which database type/version are you using? MySQL 4
What is your level of experience? New to PHP but not phpBB
What username can be used to view this issue? No answer given
What password can be used to view this issue? No answer given
When did your problem begin? After upgrading support toolkit from version 1.0.5 to 1.0.6
Please describe your problem. General Error
Language file ./language/en/nl/common.php couldn't be opened.

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: stk_msg_handler()

FILE: [ROOT]/includes/session.php
LINE: 2100
CALL: trigger_error()

FILE: [ROOT]/includes/session.php
LINE: 2059
CALL: user->set_lang()

FILE: [ROOT]/stk/includes/functions.php
LINE: 350
CALL: user->add_lang()

FILE: [ROOT]/stk/index.php
LINE: 32
CALL: stk_add_lang()
Generated by SRT Generator

Reverted back to original and added the snippet

The output after the snippet:

Code: Select all

array(2) {
  ["lang_path"]=>
  string(14) "./../language/"
  ["lang_name"]=>
  string(2) "nl"
}
array(2) {
  [0]=>
  string(2) "nl"
  [2]=>
  string(2) "en"
}
string(14) "./../language/"
bool(true)
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
User avatar
Theriddler1
Registered User
Posts: 449
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶
Contact:

Re: Support toolkit 1.0.6 language problem

by Erik Frèrejean » Tue Nov 06, 2012 3:13 pm

It appears that you have a file named common.php in your language/ directory. This file shouldn't be there (it should be in one of the language directories en/nl). As the file is checking for the location of the common language file to determine how to include language files, it will fall back to a fix for older installations due to this.
This might be caused by incorrectly uploading a language pack, but removing that file should correct the STK.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: Support toolkit 1.0.6 language problem

by Theriddler1 » Tue Nov 06, 2012 3:54 pm

Erik Frèrejean wrote:It appears that you have a file named common.php in your language/ directory. This file shouldn't be there (it should be in one of the language directories en/nl). As the file is checking for the location of the common language file to determine how to include language files, it will fall back to a fix for older installations due to this.
This might be caused by incorrectly uploading a language pack, but removing that file should correct the STK.


Yes you're a genius thank you, indeed there was a common.php file within the language map, removed that file and all is fine again. Thank you for your kind support and great explanation on this.
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
User avatar
Theriddler1
Registered User
Posts: 449
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶
Contact:

Re: Support toolkit 1.0.6 language problem

by Theriddler1 » Wed Nov 07, 2012 4:36 pm

Sorry to interup again, but totday i needed to reparse bbcode in all post so i used the tool reparse bbcode.

but all i can see is this :shock:

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user

Warning: Cannot modify header information - headers already sent by (output started at /home/peppersfor/domains/peppersrus-forum.nl/public_html/stk/includes/functions.php:670) in /home/peppersfor/domains/peppersrus-forum.nl/public_html/includes/functions.php on line 5026

Warning: Cannot modify header information - headers already sent by (output started at /home/peppersfor/domains/peppersrus-forum.nl/public_html/stk/includes/functions.php:670) in /home/peppersfor/domains/peppersrus-forum.nl/public_html/includes/functions.php on line 5028

Warning: Cannot modify header information - headers already sent by (output started at /home/peppersfor/domains/peppersrus-forum.nl/public_html/stk/includes/functions.php:670) in /home/peppersfor/domains/peppersrus-forum.nl/public_html/includes/functions.php on line 5029

Warning: Cannot modify header information - headers already sent by (output started at /home/peppersfor/domains/peppersrus-forum.nl/public_html/stk/includes/functions.php:670) in /home/peppersfor/domains/peppersrus-forum.nl/public_html/includes/functions.php on line 5030
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
User avatar
Theriddler1
Registered User
Posts: 449
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶
Contact:

Re: Support toolkit 1.0.6 language problem

by Erik Frèrejean » Thu Nov 08, 2012 6:12 am

Can you please post a new topic for this question? (I can't split here)
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: Support toolkit 1.0.6 language problem

by Theriddler1 » Sun Apr 06, 2014 12:10 pm

Theriddler1 wrote:Sorry to interup again, but totday i needed to reparse bbcode in all post so i used the tool reparse bbcode.

but all i can see is this :shock:

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_posting.php on line 2822: Undefined index: post_edit_user

Warning: Cannot modify header information - headers already sent by (output started at /home/peppersfor/domains/peppersrus-forum.nl/public_html/stk/includes/functions.php:670) in /home/peppersfor/domains/peppersrus-forum.nl/public_html/includes/functions.php on line 5026

Warning: Cannot modify header information - headers already sent by (output started at /home/peppersfor/domains/peppersrus-forum.nl/public_html/stk/includes/functions.php:670) in /home/peppersfor/domains/peppersrus-forum.nl/public_html/includes/functions.php on line 5028

Warning: Cannot modify header information - headers already sent by (output started at /home/peppersfor/domains/peppersrus-forum.nl/public_html/stk/includes/functions.php:670) in /home/peppersfor/domains/peppersrus-forum.nl/public_html/includes/functions.php on line 5029

Warning: Cannot modify header information - headers already sent by (output started at /home/peppersfor/domains/peppersrus-forum.nl/public_html/stk/includes/functions.php:670) in /home/peppersfor/domains/peppersrus-forum.nl/public_html/includes/functions.php on line 5030



For anyone who has the same error and searching for a fix read below.

The error was caused by the notify moderators modification missing a language string.

Open: \language\en\mods\notify_moderators.php

Find:

Code: Select all

'POST_APPROVE'             => 'Post approval notification',


After Add:

Code: Select all

'POST_EDIT_USER'         => 'success',
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
User avatar
Theriddler1
Registered User
Posts: 449
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶
Contact: