View Full Version : Remove Products Manually
Black Snow
09-04-2012, 02:04 PM
Is there a way to remove products manually? I used to run 4.1.3 suite but now I run 4.2.0 forum and I keep getting an error when uninstalling products.
The error is always linked to the cms table. I hope it is possible.
What error are you getting? I think there was an error involving a CMS table in the original vb4.2.0 that should be fixed in the latest PL2 version).
Black Snow
09-04-2012, 02:44 PM
What error are you getting? I think there was an error involving a CMS table in the original vb4.2.0 that should be fixed in the latest PL2 version).
This is the one I get when trying to remove the CMS that was installed.
Database error in vBulletin 4.2.0:
Invalid SQL:
DELETE cms_widgettype, cms_widget, cms_widgetconfig
FROM xxx_package AS package
LEFT JOIN xxx_cms_widgettype AS cms_widgettype
ON cms_widgettype.packageid = package.packageid
LEFT JOIN xxx_cms_widget AS cms_widget
ON cms_widget.widgettypeid = cms_widgettype.widgettypeid
LEFT JOIN xxx_cms_widgetconfig AS cms_widgetconfig
ON cms_widgetconfig.widgetid = cms_widget.widgetid
WHERE package.productid = 'vbcms';
MySQL Error : Table 'xxx.xxx_cms_widgettype' doesn't exist
Error Number : 1146
Request Date : Tuesday, September 4th 2012 @ 10:33:39 AM
Error Date : Tuesday, September 4th 2012 @ 10:33:39 AM
Script : http://xxx/forum/admincp/plugin.php?do=productkill
Referrer : http://xxx/forum/admincp/plugin.php?do=productdelete&productid=vbcms&s=
IP Address :
Username :
Classname : vB_Database
MySQL Version : 5.5.23-55
Hmm...so do you not have the CMS installed at all?
What you might be able to do is put your site in debug mode (edit the includes/config.php and add $config['Misc']['debug'] = 1; somewhere after the first line). You might want to close the forum first. Then go to the product manager and you should have a choice on the right to edit the product. That should let you edit the uninstall code, and you can comment out the query that's causing the error. Then try again to uninstall the product. (and when you're done, remember to turn off debug mode).
Black Snow
09-04-2012, 03:02 PM
I'll back my forum up first.
That's never a bad idea. But this is actually safer than trying to manually remove a product, which would involve changing the database directly. In this case the most you could do is cause another error in the uninstall code and you wouldn't really be any worse off than you are.
Black Snow
09-04-2012, 03:14 PM
This is the code for the uninstall:
/*
the CMS add a lot of things to the cache. When we do an uninstall we need to clear those values, otherwise things get weird when we do the reinstall. It would be better to be a bit smarter about what we clear, but uninstalling CMS is a rare enough event that clearing the whole thing isn't going to be a significant burden on the system.
*/
$db->query_write("DELETE FROM " . TABLE_PREFIX . "cache");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_article");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_grid");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_layout");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_category");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_nodecategory");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_layoutwidget");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_node");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_nodeconfig");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_nodeinfo");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_widget");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_widgetconfig");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_permissions");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_sectionorder");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_widgettype");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_statichtml");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_navigation");
// Drop fields
require_once(DIR . '/includes/class_dbalter.php');
$db_alter = new vB_Database_Alter_MySQL($db);
if ($db_alter->fetch_table_info('usergroup'))
{
$db_alter->drop_field('vbcmspermissions');
}
if ($db_alter->fetch_table_info('administrator'))
{
$db_alter->drop_field('vbcmspermissions');
}
// Packages, routes, actions, contenttypes
$db->query_write("
DELETE package, route, action, contenttype
FROM " . TABLE_PREFIX . "package AS package
LEFT JOIN " . TABLE_PREFIX . "route AS route
ON route.packageid = package.packageid
LEFT JOIN " . TABLE_PREFIX . "action AS action
ON action.routeid = route.routeid
LEFT JOIN " . TABLE_PREFIX . "contenttype AS contenttype
ON contenttype.packageid = package.packageid
WHERE productid = 'vbcms'
");
// Grid templates
$db->query_write("
DELETE FROM " . TABLE_PREFIX . "template
WHERE title LIKE 'vbcms_grid_%'
AND templatetype = 'template'
AND styleid = 0
AND product = 'vbcms'
");
// Clear cms cache objects
require_once(DIR . '/includes/class_bootstrap_framework.php');
vB_Bootstrap_Framework::init();
vB_Cache::instance()->event('vb_types.contenttype_updated');
vB_Cache::instance()->event('vb_types.package_updated');
vB_Cache::instance()->event('vb_types.type_updated');
vB_Cache::instance()->event('vb_cmstypes.widgettype_updated');
vB_Shutdown::instance()->shutdown();
$db->query_write("
DELETE FROM " . TABLE_PREFIX . "cron
WHERE varname = 'vbcms_daily_cleanup'
AND product = 'vbcms'
");
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "cms_rate");
I'm not sure what to comment out.
I don't see that query in there. That looks like it's from the CMS itself, is that what you're trying to uninstall?
Black Snow
09-04-2012, 03:18 PM
Yes. I'm trying to uninstall the CMS. It shows in the product manager.
There are other mods I want to uninstall too but they all give a similar error that involves the CMS table(s).
You should be able to uninstall it, as far as I know. I guess it does some automatic uninstalling of components before it runs the product uninstall code, so my idea won't work.
Another thing you could do is to try to create the missing tables. From the error you can see you're missing the xxx_cms_widgettype table, and it has a packageid, widgettypeid, and widgetid fields (which are probably all INT). You could try creating that through phpmyadmin (asusming you have that available), then try again.
Black Snow
09-04-2012, 05:45 PM
I don't suppose you have access to the php statement for creating the table to save me manually doing it?
--------------- Added 1346840535 at 1346840535 ---------------
You should be able to uninstall it, as far as I know. I guess it does some automatic uninstalling of components before it runs the product uninstall code, so my idea won't work.
Another thing you could do is to try to create the missing tables. From the error you can see you're missing the xxx_cms_widgettype table, and it has a packageid, widgettypeid, and widgetid fields (which are probably all INT). You could try creating that through phpmyadmin (asusming you have that available), then try again.
I was running a vB suite. Then I bought the forum software and I've just upgraded to 4.2.0. When I tried to uninstall the CMS, I started getting that errors.
Black Snow
09-06-2012, 04:56 PM
bump
Black Snow
10-04-2012, 01:54 PM
Anyone?
I have a lot of mods now that I can't uninstall without getting past this error. It's doing my head in.
Is there any way I can install a fresh vB forum but keep all my members, posts, templates, styles etc?
ForceHSS
10-04-2012, 02:29 PM
run the upgrade again it will install the cms
Black Snow
10-06-2012, 11:26 AM
But I', installing the forum only. I don't have a CMS. I used to have a CMS when I was running a suite but I bought the forum and now it's causing problems.
Paul M
10-06-2012, 12:29 PM
You cannot uninstall the CMS product in 4.2.0, its a known bug, fixed in 4.2.1
http://tracker.vbulletin.com/browse/VBIV-15165
Just disable it for now.
Black Snow
10-06-2012, 01:55 PM
But it is stopping me from uninstalling other mods too. When I upgraded from vB suite 4.1.3 to forum 4.2.0, it dropped all the CMS tables and it's preventing me from uninstalling all mods.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.