Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

anyone encounter this entire site deletion problem?


Guest

Recommended Posts

Can you replicate it? You could try adding some code in catalog\admin\categories.php

 

after this:

	  case 'delete_product_confirm':
	if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['product_categories']) && is_array($HTTP_POST_VARS['product_categories'])) {
	  $product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
	  $product_categories = $HTTP_POST_VARS['product_categories'];

 

add this

if( !tep_not_null($product_id) ) {
 die('invalid product id');
}

 

Now see with a test catalog and with the original code when you set the

pID=

on the browser if you get this side effect. The pID normally should have the id included. So if you manually delete the number it may cause this. In other words you be able to see the problem. Now repeat the same with the new code added see if stops the script before deleting anything.

 

Or you could add this same code right at the beginning of function tep_remove_product in catalog\admin\includes\functions\general.php

Link to comment
Share on other sites

Can you replicate it?

don't really want to :lol:

 

i will make a fresh backup of my site and put my current database to my test page and try to replicate it after i've installed your fix. (gotta redo some of the product images first, most recent backup was corrupted :( )

 

thanks again engima1 :)

Link to comment
Share on other sites

I've had this problem twice and never understood why this happened. I do backups every day so restoring my catelogue wasn't too bad. But I never knew why this happened.

 

I didn't realize that this was a bug and others experienced this problem. Would be nice to find a solution.

 

~Shayne

Link to comment
Share on other sites

i can't figure out how to test this on my test site. (engima1's code).. my test shop is a subdomain of my root site and the delete keeps trying to redirect back to my root admin catalog (just to be safe, i disabled the root admin folder while testing :lol: ) to delete the category

 

i just off the htaccess password protect and everything

 

 

is my admin config.php correct?

 

 define('HTTP_SERVER', 'http://www.mysite.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://www.mysite.com/TESTSHOP'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.mysite.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.mysite.com/TESTSHOP');
 define('HTTP_COOKIE_PATH', '/TESTSHOP/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/TESTSHOP/');
 define('DIR_WS_HTTPS_CATALOG', '/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/**/public_html/TESTSHOP/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...