Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-04-2012, 02:04 PM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Remove Products Manually

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.
Reply With Quote
  #2  
Old 09-04-2012, 02:30 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #3  
Old 09-04-2012, 02:44 PM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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.
Quote:
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?...uctid=vbcms&s=
IP Address :
Username :
Classname : vB_Database
MySQL Version : 5.5.23-55
Reply With Quote
  #4  
Old 09-04-2012, 02:55 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #5  
Old 09-04-2012, 03:02 PM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll back my forum up first.
Reply With Quote
  #6  
Old 09-04-2012, 03:06 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 09-04-2012, 03:14 PM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the code for the uninstall:
Code:
/*
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.
Reply With Quote
  #8  
Old 09-04-2012, 03:16 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #9  
Old 09-04-2012, 03:18 PM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #10  
Old 09-04-2012, 03:32 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04221 seconds
  • Memory Usage 2,267KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete