I recently installed the
Smilies Categories* extension for phpBB created by Sylver35 from the French phpBB forum Breizh Code. Before I put the extension on the live forum of Modding on the Spectrum, I tested it on my test forum on my local machine.
(I recommend everyone testing stuff before you make changes to your live forum in case something goes wrong
)
* The extension lets you place the smilies of the forum into categories which can be accessed via the "View more smilies" link above and below the Smilies section of the posting editor. The purpose of this extension is to keep the Smilies section organized when more and more smilies are added to the forum.
As soon as I try to access the "Configuration of categories" menu in the Admin Control Panel (the menu can be found under posting > messages), I got following error message:
Code: Select all
Fatal error: Uncaught TypeError: mysqli_data_seek(): Argument #2 ($offset) must be of type int, mysqli_result given in C:\xampp\htdocs\modding-on-the-spectrum.com\phpbb\db\driver\mysqli.php:288 Stack trace: #0 C:\xampp\htdocs\modding-on-the-spectrum.com\phpbb\db\driver\mysqli.php(288): mysqli_data_seek(Object(mysqli_result), Object(mysqli_result)) #1 C:\xampp\htdocs\modding-on-the-spectrum.com\phpbb\db\driver\driver.php(381): phpbb\db\driver\mysqli->sql_rowseek(Object(mysqli_result), Object(mysqli_result)) #2 C:\xampp\htdocs\modding-on-the-spectrum.com\phpbb\db\driver\factory.php(297): phpbb\db\driver\driver->sql_fetchfield('maxi', Object(mysqli_result), Object(mysqli_result)) #3 C:\xampp\htdocs\modding-on-the-spectrum.com\ext\sylver35\smiliescat\core\category.php(153): phpbb\db\driver\factory->sql_fetchfield('maxi', Object(mysqli_result)) #4 C:\xampp\htdocs\modding-on-the-spectrum.com\ext\sylver35\smiliescat\core\category.php(461): sylver35\smiliescat\core\category->get_max_order() #5 C:\xampp\htdocs\modding-on-the-spectrum.com\ext\sylver35\smiliescat\controller\admin_controller.php(194): sylver35\smiliescat\core\category->adm_list_cat('./../adm/index....') #6 C:\xampp\htdocs\modding-on-the-spectrum.com\ext\sylver35\smiliescat\acp\main_module.php(53): sylver35\smiliescat\controller\admin_controller->acp_categories_config() #7 C:\xampp\htdocs\modding-on-the-spectrum.com\includes\functions_module.php(676): sylver35\smiliescat\acp\main_module->main('\\sylver35\\smili...', 'config') #8 C:\xampp\htdocs\modding-on-the-spectrum.com\adm\index.php(81): p_master->load_active() #9 {main} thrown in C:\xampp\htdocs\modding-on-the-spectrum.com\phpbb\db\driver\mysqli.php on line 288
I got a similar error message when I tried to change the name of a category.
Additional information: The forum uses phpBB 3.3.9 and runs on PHP 8.1 as I'm writing this.
I figured out that it has something to do with the sql_fetchfield function having too many arguments (I found the final hint in
this post).
So I checked the lines of code that contain the sql_fetchfield functions in the
category.php (
ext\sylver35\smiliescat\core). The sql_fetchfield functions in these line have too many arguments: lines 153, 165 and 390.
Find:
Code: Select all
$max = $this->db->sql_fetchfield('maxi', $result);
(line 153)
Replace with
Code: Select all
$max = $this->db->sql_fetchfield('maxi');
Find:
Code: Select all
$id_max = (int) $this->db->sql_fetchfield('id_max', $result);
(line 165)
Replace with
Code: Select all
$id_max = (int) $this->db->sql_fetchfield('id_max');
Find:
Code: Select all
$total = (int) $this->db->sql_fetchfield('total', $result);
(line 390)
Replace with
Code: Select all
$total = (int) $this->db->sql_fetchfield('total');
I recently installed the [url=https://breizhcode.com/viewtopic.php?f=6&t=141&sid=0f7ea43ca6e490765dfd41048b7337ba]Smilies Categories*[/url] extension for phpBB created by Sylver35 from the French phpBB forum Breizh Code. Before I put the extension on the live forum of Modding on the Spectrum, I tested it on my test forum on my local machine.
(I recommend everyone testing stuff before you make changes to your live forum in case something goes wrong :sn-37:)
* The extension lets you place the smilies of the forum into categories which can be accessed via the "View more smilies" link above and below the Smilies section of the posting editor. The purpose of this extension is to keep the Smilies section organized when more and more smilies are added to the forum.
As soon as I try to access the "Configuration of categories" menu in the Admin Control Panel (the menu can be found under posting > messages), I got following error message:
[code]Fatal error: Uncaught TypeError: mysqli_data_seek(): Argument #2 ($offset) must be of type int, mysqli_result given in C:\xampp\htdocs\modding-on-the-spectrum.com\phpbb\db\driver\mysqli.php:288 Stack trace: #0 C:\xampp\htdocs\modding-on-the-spectrum.com\phpbb\db\driver\mysqli.php(288): mysqli_data_seek(Object(mysqli_result), Object(mysqli_result)) #1 C:\xampp\htdocs\modding-on-the-spectrum.com\phpbb\db\driver\driver.php(381): phpbb\db\driver\mysqli->sql_rowseek(Object(mysqli_result), Object(mysqli_result)) #2 C:\xampp\htdocs\modding-on-the-spectrum.com\phpbb\db\driver\factory.php(297): phpbb\db\driver\driver->sql_fetchfield('maxi', Object(mysqli_result), Object(mysqli_result)) #3 C:\xampp\htdocs\modding-on-the-spectrum.com\ext\sylver35\smiliescat\core\category.php(153): phpbb\db\driver\factory->sql_fetchfield('maxi', Object(mysqli_result)) #4 C:\xampp\htdocs\modding-on-the-spectrum.com\ext\sylver35\smiliescat\core\category.php(461): sylver35\smiliescat\core\category->get_max_order() #5 C:\xampp\htdocs\modding-on-the-spectrum.com\ext\sylver35\smiliescat\controller\admin_controller.php(194): sylver35\smiliescat\core\category->adm_list_cat('./../adm/index....') #6 C:\xampp\htdocs\modding-on-the-spectrum.com\ext\sylver35\smiliescat\acp\main_module.php(53): sylver35\smiliescat\controller\admin_controller->acp_categories_config() #7 C:\xampp\htdocs\modding-on-the-spectrum.com\includes\functions_module.php(676): sylver35\smiliescat\acp\main_module->main('\\sylver35\\smili...', 'config') #8 C:\xampp\htdocs\modding-on-the-spectrum.com\adm\index.php(81): p_master->load_active() #9 {main} thrown in C:\xampp\htdocs\modding-on-the-spectrum.com\phpbb\db\driver\mysqli.php on line 288[/code]
I got a similar error message when I tried to change the name of a category.
Additional information: The forum uses phpBB 3.3.9 and runs on PHP 8.1 as I'm writing this.
I figured out that it has something to do with the sql_fetchfield function having too many arguments (I found the final hint in [url=https://github.com/Sajaki/RecentTopics/issues/142#issuecomment-813488597]this post[/url]).
So I checked the lines of code that contain the sql_fetchfield functions in the [b][color=#BFFFFF]category.php[/color][/b] ([i]ext\sylver35\smiliescat\core[/i]). The sql_fetchfield functions in these line have too many arguments: lines 153, 165 and 390.
Find:
[code]$max = $this->db->sql_fetchfield('maxi', $result);[/code]
(line 153)
Replace with
[code]$max = $this->db->sql_fetchfield('maxi');[/code]
Find:
[code]$id_max = (int) $this->db->sql_fetchfield('id_max', $result);[/code]
(line 165)
Replace with
[code]$id_max = (int) $this->db->sql_fetchfield('id_max');[/code]
Find:
[code]$total = (int) $this->db->sql_fetchfield('total', $result);[/code]
(line 390)
Replace with
[code]$total = (int) $this->db->sql_fetchfield('total');[/code]