Question MySQL Error

GamerMob

Customer
I am getting errors when installing and would like to remove all instances of the add-on from the database. I manually removed files and now I have left over data from the addon. Is there a query I can run to remove all components of the add-on?
 

Fillip H.

Staff member
Owner
Developer
Please post the errors you are getting when installing.

You may need to restore from backup, as manually removing an add-on is not a simple process nor is that something we can assist with.

I would be happy to assist with the errors you're receiving when installing, if you can post the error messages & stack traces.
 

GamerMob

Customer
Code:
INSERT IGNORE INTO xf_dbtech_shop_bank
                    (`user_id`, `currency_id`, `points`)
                SELECT
                    `user_id`,
                    '1',
                    '0.00'
                FROM `xf_user` AS `user`
                ORDER BY `user_id`
            
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#4 src/addons/DBTech/Shop/Setup.php(87): XF\Db\AbstractAdapter->query('
                INSERT IGN...')
#5 src/XF/AddOn/StepRunnerInstallTrait.php(60): DBTech\Shop\Setup->installStep3(Array)
#6 src/XF/AddOn/StepRunnerInstallTrait.php(27): DBTech\Shop\Setup->installStepRunner(3, Array)
#7 src/XF/Job/AddOnInstallBatch.php(293): DBTech\Shop\Setup->install(Array)
#8 src/XF/Job/AddOnInstallBatch.php(89): XF\Job\AddOnInstallBatch->stepAction(Object(XF\Timer))
#9 src/XF/Job/Manager.php(258): XF\Job\AddOnInstallBatch->run(8)
#10 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, 8)
#11 src/XF/Job/Manager.php(116): XF\Job\Manager->runJobEntry(Array, 8)
#12 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#13 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#14 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\UserCriteria\XF\Admin\Controller\Tools), NULL)
#15 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\UserCriteria\XF\Admin\Controller\Tools), NULL)
#16 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#18 src/XF.php(488): XF\App->run()
#19 admin.php(13): XF::runApp('XF\\Admin\\App')
#20 {main}

Code:
INSERT IGNORE INTO xf_dbtech_shop_bank
                    (`user_id`, `currency_id`, `points`)
                SELECT
                    `user_id`,
                    '1',
                    '0.00'
                FROM `xf_user` AS `user`
                ORDER BY `user_id`
            
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#4 src/addons/DBTech/Shop/Setup.php(87): XF\Db\AbstractAdapter->query('
                INSERT IGN...')
#5 src/XF/AddOn/StepRunnerInstallTrait.php(60): DBTech\Shop\Setup->installStep3(Array)
#6 src/XF/AddOn/StepRunnerInstallTrait.php(27): DBTech\Shop\Setup->installStepRunner(3, Array)
#7 src/XF/Admin/Controller/AddOn.php(403): DBTech\Shop\Setup->install(Array)
#8 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\AddOn->actionInstall(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:AddOn', 'Install', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
#10 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
#11 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#13 src/XF.php(488): XF\App->run()
#14 admin.php(13): XF::runApp('XF\\Admin\\App')
#15 {main}
 

GamerMob

Customer
XF\Db\Exception: Batch install error: MySQL statement prepare error [1054]: Unknown column 'user_id' in 'field list' src/XF/Db/AbstractStatement.php:228

XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'user_id' in 'field list' src/XF/Db/AbstractStatement.php:228
 

GamerMob

Customer
Is this a clean install or an upgrade?

So I first installed an older version then it wouldn't finish the install, so I deleted the files manually. I then tried the latest version and got those errors I posted.

It's like my database still has entries for this addon.

2stpcAe.png


6IX8NLc.png
 

Fillip H.

Staff member
Owner
Developer
You need to re-upload the version you previously tried to install then install that. After that's installed, you can uninstall it, remove the files, then download & install the latest version.
 

GamerMob

Customer
So I did that, and uninstalled and removed all the files. It still shows it in my installable add-on even though all the data is removed.

Z2O8k10.png


I tried downloading the latest version and it ends up failing and corrupting my database to the point where my site crashes.
 

GamerMob

Customer
Even with everything now uninstalled and removed I am still getting a bunch of these server errors.

ErrorException: Template error: [E_USER_WARNING] Method canViewDbtechShopItems is not callable on the given object (NF\GiftUpgrades\XF\Entity\User) src/XF/Template/Templater.php:1161

Code:
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/gamermob/...', 1161, Array)
#1 src/XF/Template/Templater.php(1161): trigger_error('Method canViewD...', 512)
#2 internal_data/code_cache/templates/l1/s6/public/member_list_macros.php(45): XF\Template\Templater->method(Object(NF\GiftUpgrades\XF\Entity\User), 'canViewDbtechSh...', Array)
#3 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#4 internal_data/code_cache/templates/l1/s6/public/member_notable.php(143): XF\Template\Templater->callMacro('member_list_mac...', 'item', Array, Array)
#5 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#6 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('member_notable', Array)
#7 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#8 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Member\\Notab...', 'public:member_n...', Array)
#9 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#12 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#13 src/XF.php(488): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}
 

Fillip H.

Staff member
Owner
Developer
Could you please use the "Attach secure data" button to allow me access to your site so I can look into this further?

The attached data is encrypted before being saved, and the decryption key will be emailed to both of us. The decrypted information is not stored in the browser nor on our servers. You can purge the data entirely at any point by clicking the "Delete secure data" button.

As this is a much more secure method of exchanging sensitive information, I am unable to accept private messages / conversations with sensitive information. If you have previously submitted private messages / conversations with sensitive information, please ensure this information has been changed and that it is no longer valid.
 

GamerMob

Customer
I want to uninstall the add-on for the meantime and when I did I am still getting errors.

When I view the online list I get this

Code:
XF\Db\Exception: MySQL statement prepare error [1146]: Table 'gamermob_gmobv1.xf_dbtech_shop_category' doesn't exist in src/XF/Db/AbstractStatement.php at line 228
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->query() in src/XF/Mvc/Entity/Finder.php at line 1379
XF\Mvc\Entity\Finder->fetch() in src/XF/Mvc/Entity/Manager.php at line 212
XF\Mvc\Entity\Manager->findByIds() in src/addons/DBTech/Shop/Pub/Controller/Category.php at line 213
DBTech\Shop\Pub\Controller\Category::DBTech\Shop\Pub\Controller\{closure}() in src/XF/Pub/Controller/AbstractController.php at line 628
XF\Pub\Controller\AbstractController::getActivityDetailsForContent() in src/addons/DBTech/Shop/Pub/Controller/Category.php at line 228
DBTech\Shop\Pub\Controller\Category::getActivityDetails()
call_user_func() in src/XF/Repository/SessionActivity.php at line 224
XF\Repository\SessionActivity->applyActivityDetails() in src/XF/Pub/Controller/Online.php at line 43
XF\Pub\Controller\Online->actionIndex() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2326
XF\App->run() in src/XF.php at line 488
XF::runApp() in index.php at line 20
 

Fillip H.

Staff member
Owner
Developer
That would only be happening temporarily while the add-on was in the process of being uninstalled.

You don't need to uninstall add-ons temporarily either, you can just deactivate it.
 

DragonByte Shop

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x XenForo 2.2.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
2,468
Customer rating
5.00 star(s) 3 ratings
Top