AlexSheer / phpBB3.2-STK

Support ToolKit For phpBB3.2.x
https://www.phpbbguru.net/community/viewtopic.php?f=64&t=42862
15 stars 13 forks source link

Bug on cleaning permissions step #36

Closed Leinad4Mind closed 5 years ago

Leinad4Mind commented 5 years ago

atal error: Uncaught Error: Call to a member function add_lang() on null in /forum/stk/includes/database_cleaner/database_cleaner_views.php:460 Stack trace: #0 /forum/stk/tools/support/database_cleaner.php(174): database_cleaner_views->groups() #1 /forum/stk/index.php(301): database_cleaner->display_options() #2 {main} thrown in /forum/stk/includes/database_cleaner/database_cleaner_views.php on line 460 Error 1: Uncaught Error: Call to a member function add_lang() on null in /forum/stk/includes/database_cleaner/database_cleaner_views.php:460 Stack trace: #0 /forum/stk/tools/support/database_cleaner.php(174): database_cleaner_views->groups() #1 /forum/stk/index.php(301): database_cleaner->display_options() #2 {main} thrown at file /forum/stk/includes/database_cleaner/database_cleaner_views.php line 460

Leinad4Mind commented 5 years ago

Bug on step 11 Fatal error: Uncaught Error: Call to a member function add_lang() on null in /stk/includes/database_cleaner/database_cleaner_views.php:720

AlexSheer commented 5 years ago

Not confirmed. Maybe you just need to update the STK.

Leinad4Mind commented 5 years ago

Strange, I'm using the last version from here. My database was an upgrade from 3.0 btw. So I had many leftovers dunno if that matters... And Im using phpBB 3.2.5 with PHP 7.2 I was able to bypass by removing the lang lines that were causing issues.

Leinad4Mind commented 5 years ago

Oh btw, when I begun since I had pt language I've change one line to bypass the 1st problem too.

include(STK_ROOT_PATH . 'language/' . $user->data['user_lang'] . '/' . $lang_file . '.' . PHP_EXT); to this: include(STK_ROOT_PATH . 'language/en/' . $lang_file . '.' . PHP_EXT);

because the stk doesnt have the pt language.

Maybe the problem is all related to this.

I guess it should have a fallback operation in case the user language doesnt exist it should use english all the way.

AlexSheer commented 5 years ago

You can create a language/pt folder and just copy there all the files from the language/en folder You also need to change the default language for the user Anonimous from en to pt This must be done directly in the database.

In addition, you could just comment out lines like $language->add_lang(array('acp/common')); in database_cleaner_views.php

Leinad4Mind commented 5 years ago

🤦‍♂ thats embarassing lol I didnt thought about that simple way of bypassing the problem lol

Thanks for the input. Appreciated.

spinecki commented 4 years ago

I have the exact same problem...

Database server: MySQL(i) 10.2.19-MariaDB Board version: 3.2.5 Support Tookit version: 1.0.14-dev GZip compression: Off Database type: mysqli PHP version: 7.1.29

If I comment out those lines, I get further errors. So primary error is: Fatal error: Uncaught Error: Call to a member function add_lang() on null in /home/e90forum/domains/e90forum.pl/public_html/stk/includes/database_cleaner/database_cleaner_views.php:460 Stack trace: #0 /home/e90forum/domains/e90forum.pl/public_html/stk/tools/support/database_cleaner.php(174): database_cleaner_views->groups() #1 /home/e90forum/domains/e90forum.pl/public_html/stk/index.php(301): database_cleaner->display_options() #2 {main} thrown in /home/e90forum/domains/e90forum.pl/public_html/stk/includes/database_cleaner/database_cleaner_views.php on line 460 Error 1: Uncaught Error: Call to a member function add_lang() on null in /home/e90forum/domains/e90forum.pl/public_html/stk/includes/database_cleaner/database_cleaner_views.php:460 Stack trace: #0 /home/e90forum/domains/e90forum.pl/public_html/stk/tools/support/database_cleaner.php(174): database_cleaner_views->groups() #1 /home/e90forum/domains/e90forum.pl/public_html/stk/index.php(301): database_cleaner->display_options() #2 {main} thrown at file /home/e90forum/domains/e90forum.pl/public_html/stk/includes/database_cleaner/database_cleaner_views.php line 460