Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 1980

Extension Writers Discussion • Fatal error when trying to delete extension data

$
0
0
Hi,

My website was offline for a few years and I've just recently put it back online, it appears to be working fine, but my extensions are throwing an error when I'm trying to delete the data after disabling the extension.

Fatal error: Uncaught TypeError: call_user_func_array(): Argument #2 ($args) must be of type array, string given in E:\xampp2025\htdocs\phpBB3\phpbb\db\migrator.php:715 Stack trace: #0 E:\xampp2025\htdocs\phpBB3\phpbb\db\migrator.php(715): call_user_func_array(Array, 'splicker_snapne...') #1 E:\xampp2025\htdocs\phpBB3\phpbb\db\migrator.php(662): phpbb\db\migrator->run_step(Array, NULL, false) #2 E:\xampp2025\htdocs\phpBB3\phpbb\db\migrator.php(555): phpbb\db\migrator->process_data_step(Array, Array) #3 E:\xampp2025\htdocs\phpBB3\phpbb\db\migrator.php(518): phpbb\db\migrator->try_revert('\\splicker\\snapn...') #4 E:\xampp2025\htdocs\phpBB3\phpbb\db\migrator.php(489): phpbb\db\migrator->revert_do('\\splicker\\snapn...') #5 E:\xampp2025\htdocs\phpBB3\phpbb\extension\base.php(108): phpbb\db\migrator->revert('\\splicker\\snapn...') #6 E:\xampp2025\htdocs\phpBB3\phpbb\extension\manager.php(342): phpbb\extension\base->purge_step(true) #7 E:\xampp2025\htdocs\phpBB3\includes\acp\acp_extensions.php(305): phpbb\extension\manager->purge_step('splicker/snapne...') #8 E:\xampp2025\htdocs\phpBB3\includes\functions_module.php(684): acp_extensions->main('extensions', 'main') #9 E:\xampp2025\htdocs\phpBB3\adm\index.php(81): p_master->load_active() #10 {main} thrown in E:\xampp2025\htdocs\phpBB3\phpbb\db\migrator.php on line 715

And this is the code in my extension schema file to delete the data:

Code:

public function revert_schema(){return array('drop_tables'=> array($this->table_prefix . 'snapnews',),);}public function revert_data(){return array(array('config.remove', 'splicker_snapnews'),array('config.remove', 'enable_snapnews'),array('config.remove', 'enable_snapnews_index'),array('permission.remove', array('u_allow_news_posting')),);}
Any ideas?

I've also put my site files on my xampp localhost server and done a fresh install of phpbb, then I installed my extensions on a fresh phpBB and I'm getting the same error when trying to delete the extension data. The extensions install and enabled/disable without issue, I only get the error when trying to delete the data.

I figure maybe something has changed in the last 2 years and now my revert code doesn't work.

Any help would be appreciated.

Thanks

Statistics: Posted by maxrpg — Sat Mar 08, 2025 3:07 pm



Viewing all articles
Browse latest Browse all 1980

Trending Articles